WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WC_Helper_Updater::get_updates_count() public WC 1.0

Get the number of products that have updates.

Это метод класса: WC_Helper_Updater{}

Хуков нет.

Возвращает

Число. The number of products with updates.

Использование

$result = WC_Helper_Updater::get_updates_count();

Код WC_Helper_Updater::get_updates_count() WC 4.5.2

woocommerce/includes/admin/helper/class-wc-helper-updater.php
<?php
public static function get_updates_count() {
	$cache_key = '_woocommerce_helper_updates_count';
	$count     = get_transient( $cache_key );
	if ( false !== $count ) {
		return $count;
	}

	// Don't fetch any new data since this function in high-frequency.
	if ( ! get_transient( '_woocommerce_helper_subscriptions' ) ) {
		return 0;
	}

	if ( ! get_transient( '_woocommerce_helper_updates' ) ) {
		return 0;
	}

	$count       = 0;
	$update_data = self::get_update_data();

	if ( empty( $update_data ) ) {
		set_transient( $cache_key, $count, 12 * HOUR_IN_SECONDS );
		return $count;
	}

	// Scan local plugins.
	foreach ( WC_Helper::get_local_woo_plugins() as $plugin ) {
		if ( empty( $update_data[ $plugin['_product_id'] ] ) ) {
			continue;
		}

		if ( version_compare( $plugin['Version'], $update_data[ $plugin['_product_id'] ]['version'], '<' ) ) {
			$count++;
		}
	}

	// Scan local themes.
	foreach ( WC_Helper::get_local_woo_themes() as $theme ) {
		if ( empty( $update_data[ $theme['_product_id'] ] ) ) {
			continue;
		}

		if ( version_compare( $theme['Version'], $update_data[ $theme['_product_id'] ]['version'], '<' ) ) {
			$count++;
		}
	}

	set_transient( $cache_key, $count, 12 * HOUR_IN_SECONDS );
	return $count;
}