WC_Query::handle_get_posts()publicWC 1.0

Handler for the the_posts filter.

Method of the class: WC_Query{}

No Hooks.

Return

Array.

Usage

$WC_Query = new WC_Query();
$WC_Query->handle_get_posts( $posts, $query );
$posts(array) (required)
Posts from WP Query.
$query(WP_Query) (required)
Current query.

WC_Query::handle_get_posts() code WC 9.1.2

public function handle_get_posts( $posts, $query ) {
	if ( 'product_query' !== $query->get( 'wc_query' ) ) {
		return $posts;
	}
	$this->remove_product_query_filters( $posts );
	return $posts;
}