From ec1c30283f718c22e56ba9338996a879a76a961f Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Mon, 11 Jul 2016 15:48:47 +0200 Subject: [PATCH] Make easy to remove meta query items, closes #11339 --- includes/class-wc-query.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/includes/class-wc-query.php b/includes/class-wc-query.php index 20148b0369907..5dd7d54972210 100644 --- a/includes/class-wc-query.php +++ b/includes/class-wc-query.php @@ -517,8 +517,8 @@ public function order_by_rating_post_clauses( $args ) { /** * Appends meta queries to an array. - * @access public - * @param array $meta_query + * + * @param array $meta_query * @return array */ public function get_meta_query( $meta_query = array() ) { @@ -526,10 +526,10 @@ public function get_meta_query( $meta_query = array() ) { $meta_query = array(); } - $meta_query[] = $this->visibility_meta_query(); - $meta_query[] = $this->stock_status_meta_query(); - $meta_query[] = $this->price_filter_meta_query(); - $meta_query[] = $this->rating_filter_meta_query(); + $meta_query['visibility'] = $this->visibility_meta_query(); + $meta_query['stock_status'] = $this->stock_status_meta_query(); + $meta_query['price_filter'] = $this->price_filter_meta_query(); + $meta_query['rating_filter'] = $this->rating_filter_meta_query(); return array_filter( apply_filters( 'woocommerce_product_query_meta_query', $meta_query, $this ) ); }