Automattic\WooCommerce\Blocks

QueryFilters::add_query_clauses()publicWC 1.0

Add conditional query clauses based on the filter params in query vars.

Method of the class: QueryFilters{}

No Hooks.

Return

Array.

Usage

$QueryFilters = new QueryFilters();
$QueryFilters->add_query_clauses( $args, $wp_query );
$args(array) (required)
Query args.
$wp_query(\WP_Query) (required)
WP_Query object.

QueryFilters::add_query_clauses() code WC 8.9.0

public function add_query_clauses( $args, $wp_query ) {
	$args = $this->stock_filter_clauses( $args, $wp_query );
	$args = $this->price_filter_clauses( $args, $wp_query );
	$args = $this->attribute_filter_clauses( $args, $wp_query );

	return $args;
}