Support Forum

Content of the article

You need to log-in to create request (topic) to the support

How to let woof work with custom search query

This support system is for all types of the plugins as for premium versions, so for free ones! If you have premium version do not forget in the private data of the request (!!not in the text of the support request!!) after its publishing insert purchase code please (see green button on the right side) and press Save button.
If you not got email within 24 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.


I have prepared the following:

            $args_product = array(
                'post_type' => 'product',
                'post__in'  => $post_ids,
                'posts_per_page' => 24,
                'paged' => $paged,
                'orderby' => 'post__in'
            $product_query = new wp_query( $args_product );
from here onward, I may iterate thru the result. So far, so good but I also want to active the available filters like that:
echo do_shortcode( '[woof]' );
I'd like to have woof working with that new $product_query. How to achieve that?


Read  this  please -  AND


It doesn't answer my question!!!

$product_query = new wp_query( $args_product );

That's completely new, custom, out of any wordpress flow. That's the Wordpress object which I'm asking how to pass over to woof for applying the filters, already defined in the admin interface.

One more thing: I tried that one

                            add_filter('woof_get_tax_query', 'my_woof_get_tax_query');
                            function my_woof_get_tax_query($tax_args){
                                echo $tax_args.'TEST';
                                return $tax_args;
                            echo do_shortcode( '[woof]' );
It does't print the args with TEST at the end. Actually - because of my custom query, the filters applied that way are on ALL of the products in the shop.
I'm looking for something like that:
                            add_filter('woof_query', 'my_woof_query');
                            function my_woof_query($args){
                                $args->set('post__in' , $my_custom_id_array);
                                $args->set('orderby' , 'post__in');
                                return $tax_args;
                            echo do_shortcode( '[woof]' );

Or something like:

global $WOOF;


echo do_shortcode('[woof]');



To  get  license  key -

These hooks are only for taxonomies and meta data.

To add  another arguments   - please  use  standard  hooks for WP_Query -  pre_get_posts

Do you want it use this only for filter?



I put the license.

pre_get_posts is called too early. Here I'm talking for completely custom WP_Query object which I'd like to have woof working with somehow.
Tried to set

$GLOBALS['wp_query'] = $my_product_query;

But seems like woof doesn't consider it. The best would be to have something like

and afterwards the execution of the shortcode.
If not available - what is the price to have it working that way and how much time?


pre_get_posts is called too early. - ???

If not available - what is the price to have it working that way and how much time? -