Skip to content

Commit

Permalink
Make easy to remove meta query items, closes woocommerce#11339
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiosanches committed Jul 11, 2016
1 parent 4c380aa commit ec1c302
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions includes/class-wc-query.php
Original file line number Diff line number Diff line change
Expand Up @@ -517,19 +517,19 @@ 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() ) {
if ( ! is_array( $meta_query ) ) {
$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 ) );
}
Expand Down

0 comments on commit ec1c302

Please sign in to comment.