WC_Widget_Layered_Nav::get_filtered_term_product_counts()protectedWC 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.

Return

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 9.4.2

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 );
}