• Resolved Alex

    (@wishe)


    Hi

    I tried to use the ‘berocket_aapf_listener_wp_query_args’ hook to pass in some arguments to the query. The hook fires but the arguments do not seem to get applied`but the function is returning the arguments array.

    This is the code i am using

    public function ajax_response_filters($args) {
    	$args['tax_query'][] = array(
                                'taxonomy' => 'tax-name,
                                'terms' => 28,
                                'field' => 'id',
                                'include_children' => true,
                                'operator' => 'IN'
                            );
            return $args;
    }
    
    add_filter('berocket_aapf_listener_wp_query_args', array($this, 'ajax_response_filters'));
    

    I have not yet bought the PRO version because I wanted to see if I could make the plugin work how I wanted to first. Any ideas why this is not working?

    • This topic was modified 8 years, 2 months ago by Alex.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author RazyRx

    (@razyrx)

    Hi,

    Please try to use
    add_filter(‘berocket_aapf_listener_wp_query_args’, array($this, ‘ajax_response_filters’), 20);
    Because our plugin also uses this hook and you changes can be replaced.

    Regards,
    Oleg

    Thread Starter Alex

    (@wishe)

    Thanks for your help Oleg. That works perfectly!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Development hooks’ is closed to new replies.