diff --git a/includes/class-wc-query.php b/includes/class-wc-query.php index b42a754673d..3c88200ef9e 100644 --- a/includes/class-wc-query.php +++ b/includes/class-wc-query.php @@ -598,12 +598,10 @@ class WC_Query { * @return array */ public function get_meta_query( $meta_query = array(), $main_query = false ) { - global $wp_query; - if ( ! is_array( $meta_query ) ) { $meta_query = array(); } - if ( $main_query || $wp_query === self::$product_query ) { + if ( $main_query ) { $meta_query['price_filter'] = $this->price_filter_meta_query(); } return array_filter( apply_filters( 'woocommerce_product_query_meta_query', $meta_query, $this ) );