What's the meaning of "Parses the request to find the correct WordPress query" in plain Englush?

Reference: https://developer.wordpress.org/reference/classes/wp/parse_request/

I encountered this function while trying to edit a PayPal gateway plugin as below.

 * Parse request to find correct WordPress query.
 * @since 1.6.4
 * @param WP_Query $wp WordPress Query object.
public function parse_request( $wp ) {  
    if ( array_key_exists( 'acadp_action', $wp->query_vars ) && 'paypal-ipn' == $wp->query_vars['acadp_action'] && array_key_exists( 'acadp_order', $wp->query_vars ) ) {
        $this->process_payment_ipn( $wp->query_vars['acadp_order'] );
  • That’s a different function that’s part of the PayPal plugin. It’s not the core WordPress function you linked to, it just has the same name. What problem are you trying to solve? Dec 27, 2021 at 10:55
  • It basically has the sample explanation - "Parse request to find correct WordPress query." So I figured they are doing the same thing which I don't understand.
    – ratib90486
    Dec 28, 2021 at 1:15
  • The plugin function is probably just hooked into the parse_request hook, which runs at the end of the function. But do you want to know what the WordPress function does, or what the plugin function does? Since the code is right there, is there something in there that isn’t clear? What are you trying to do? Dec 28, 2021 at 1:26
  • Thank you @JacobPeattie
    – ratib90486
    Jan 3, 2022 at 11:43
  • @JacobPeattie can you post that as an answer? That they just share the same name ?
    – Tom J Nowell
    Jan 4, 2022 at 10:16


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.