• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WooCommerce a2z

WooCommerce a2z

WooCommerce

  • Home
  • Plugins
  • Blocks
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / AbstractTermsRoute::get_term_count() – Get count of terms for current query.

You appear to be a bot. Output may be restricted

Description

Get count of terms for current query.

Usage

$int = AbstractTermsRoute::get_term_count( $taxonomy, $args );

Parameters

$taxonomy
( string ) required – Taxonomy to get terms from.
$args
( array ) required – Array of args to pass to wp_count_terms.

Returns

int

Source

File name: woocommerce/packages/woocommerce-blocks/src/StoreApi/Routes/AbstractTermsRoute.php
Lines:

1 to 5 of 5
  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 );
  }
 

 View on GitHub View on Trac

Published: 21st August 2020 | Last updated: 10th December 2020

Primary Sidebar

Information

Function name: AbstractTermsRoute::get_term_count
Class ref: AbstractTermsRoute
Plugin ref: WooCommerce
Version: 5.1.0
Sourcefile: packages/woocommerce-blocks/src/StoreApi/Routes/AbstractTermsRoute.php
File ref: packages/woocommerce-blocks/src/StoreApi/Routes/AbstractTermsRoute.php
Deprecated?: No
API Letters: A,C,G,T

Footer

WooCommerce a2z
WooCommerce a2z
WooCommerce
WordPress 5.7.1
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  woocommerce.wp-a2z.org
© Copyright WooCommerce a2z 2014-2021. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites