You appear to be a bot. Output may be restricted
Description
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.
Usage
$array = WC_Query::remove_product_query_filters( $posts );
Parameters
- $posts
- ( array ) required – Posts from WP Query.
Returns
array
Source
File name: woocommerce/includes/class-wc-query.php
Lines:
1 to 5 of 5
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; }