remove the WP main query check
This commit is contained in:
parent
9855a18036
commit
e1213f8432
|
@ -598,12 +598,10 @@ class WC_Query {
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function get_meta_query( $meta_query = array(), $main_query = false ) {
|
public function get_meta_query( $meta_query = array(), $main_query = false ) {
|
||||||
global $wp_query;
|
|
||||||
|
|
||||||
if ( ! is_array( $meta_query ) ) {
|
if ( ! is_array( $meta_query ) ) {
|
||||||
$meta_query = array();
|
$meta_query = array();
|
||||||
}
|
}
|
||||||
if ( $main_query || $wp_query === self::$product_query ) {
|
if ( $main_query ) {
|
||||||
$meta_query['price_filter'] = $this->price_filter_meta_query();
|
$meta_query['price_filter'] = $this->price_filter_meta_query();
|
||||||
}
|
}
|
||||||
return array_filter( apply_filters( 'woocommerce_product_query_meta_query', $meta_query, $this ) );
|
return array_filter( apply_filters( 'woocommerce_product_query_meta_query', $meta_query, $this ) );
|
||||||
|
|
Loading…
Reference in New Issue