remove_ordering_args from .18

This commit is contained in:
Mike Jolley 2013-10-21 13:05:34 +01:00
parent 4625ba8a22
commit 67e4f0731e
1 changed files with 10 additions and 1 deletions

View File

@ -59,7 +59,8 @@ class WC_Query {
add_action( 'parse_request', array( $this, 'parse_request'), 0 );
add_filter( 'pre_get_posts', array( $this, 'pre_get_posts' ) );
add_filter( 'the_posts', array( $this, 'the_posts' ), 11, 2 );
add_filter( 'wp', array( $this, 'remove_product_query' ) );
add_action( 'wp', array( $this, 'remove_product_query' ) );
add_action( 'wp', array( $this, 'remove_ordering_args' ) );
}
$this->init_query_vars();
@ -377,6 +378,14 @@ class WC_Query {
remove_filter( 'posts_clauses', array( $this, 'order_by_rating_post_clauses' ) );
}
/**
* Remove ordering queries
*/
public function remove_ordering_args() {
remove_filter( 'posts_clauses', array( $this, 'order_by_popularity_post_clauses' ) );
remove_filter( 'posts_clauses', array( $this, 'order_by_rating_post_clauses' ) );
}
/**
* Remove the posts_where filter
*