WOOF - WooCommerce Products Filter

woof_main_query_tax_relations

This hook allows set logic ‘AND‘ for any taxonomies in the WOOF search request.

Use it in your current wp theme functions.php file:

add_filter('woof_main_query_tax_relations', 'my_woof_main_query_tax_relations');

function my_woof_main_query_tax_relations()
{
    return array(
	   'product_cat' => 'AND'
    );
}

In the example above shown how to apply logic ‘AND‘ for products categories. The same possible to realize for more taxonomies on the same time:

add_filter('woof_main_query_tax_relations', 'my_woof_main_query_tax_relations');

function my_woof_main_query_tax_relations()
{
    return array(
	   'product_cat' => 'AND',
	   'product_tag' => 'AND',
	   'pa_color' => 'AND'
    );
}

Video: https://drive.google.com/file/d/0B4zUhfhZlonlNkVXMEZIdUxlWFU/view?usp=sharing