WC_Widget_Layered_Nav::get_filtered_term_product_countsprotectedWC 1.0

Count products within certain terms, taking the main WP query into consideration.

This query allows counts to be generated based on the viewed products, not all products.

Method of the class: WC_Widget_Layered_Nav{}

No Hooks.

Returns

Array.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_filtered_term_product_counts( $term_ids, $taxonomy, $query_type );
$term_ids(array) (required)
Term IDs.
$taxonomy(string) (required)
Taxonomy.
$query_type(string) (required)
Query Type.

WC_Widget_Layered_Nav::get_filtered_term_product_counts() code WC 10.4.3

protected function get_filtered_term_product_counts( $term_ids, $taxonomy, $query_type ) {
	return wc_get_container()->get( Filterer::class )->get_filtered_term_product_counts( $term_ids, $taxonomy, $query_type );
}