woocommerce_product_query_tax_query
Использование
add_filter( 'woocommerce_product_query_tax_query', 'wp_kama_woocommerce_product_query_tax_filter', 10, 2 );
/**
* Function for `woocommerce_product_query_tax_query` filter-hook.
*
* @param $tax_query
* @param $that
*
* @return
*/
function wp_kama_woocommerce_product_query_tax_filter( $tax_query, $that ){
// filter...
return $tax_query;
}
- $tax_query
- -
- $that
- -
Где вызывается хук
woocommerce_product_query_tax_query
woocommerce/includes/class-wc-query.php 866
return array_filter( apply_filters( 'woocommerce_product_query_tax_query', $tax_query, $this ) );
Где используется хук в WooCommerce
woocommerce/includes/class-wc-brands.php 64
add_filter( 'woocommerce_product_query_tax_query', array( $this, 'update_product_query_tax_query' ), 10, 1 );