WordPress at Your Fingertips
function is not described

WC_Query::remove_product_query_filters() public WC 1.0

Pre_get_posts above may adjust the main query to add WooCommerce logic. When this query is done, we need to ensure all custom filters are removed.

This is done here during the_posts filter. The input is not changed.

{} It's a method of the class: WC_Query{}

No Hooks.

Return

Array.

Usage

$WC_Query = new WC_Query();
$WC_Query->remove_product_query_filters( $posts );
$posts(array) (required)
Posts from WP Query.

Code of WC_Query::remove_product_query_filters() WC 5.6.0

public function remove_product_query_filters( $posts ) {
	$this->remove_ordering_args();
	remove_filter( 'posts_clauses', array( $this, 'price_filter_post_clauses' ), 10, 2 );
	return $posts;
}