HUSKY - Products Filter Professional for WooCommerce

woof_main_query_tax_relations

Dieser Hook ermöglicht die Logik „AND‘ für alle Taxonomien in der WOOF-Suchanfrage.

Verwenden Sie es in Ihrem aktuellen wp-Theme functions.php Datei:

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'
    );
}

Im obigen Beispiel wurde gezeigt, wie die Logik angewendet wird ‚AND' für Produktkategorien festzulegen. Das Gleiche ist möglich für weitere Taxonomien zur gleichen Zeit:

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