WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Blocks\StoreApi\Routes

AbstractTermsRoute::get_term_count() protected WC 1.0

Get count of terms for current query.

{} It's a method of the class: AbstractTermsRoute{}

No Hooks.

Return

Int.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_term_count( $taxonomy, $args );
$taxonomy(string) (required)
Taxonomy to get terms from.
$args(array) (required)
Array of args to pass to wp_count_terms.

Code of AbstractTermsRoute::get_term_count() WC 5.6.0

protected function get_term_count( $taxonomy, $args ) {
	$count_args = $args;
	unset( $count_args['number'], $count_args['offset'] );
	return (int) wp_count_terms( $taxonomy, $count_args );
}