WC_Helper_Updater::get_updates_count_based_on_site_status()public staticWC 1.0

Get the update count to based on the status of the site.

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

Хуков нет.

Возвращает

int.

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

$result = WC_Helper_Updater::get_updates_count_based_on_site_status();

Код WC_Helper_Updater::get_updates_count_based_on_site_status() WC 9.4.2

public static function get_updates_count_based_on_site_status() {
	if ( ! WC_Helper::is_site_connected() ) {
		return 0;
	}

	$count = self::get_updates_count() ?? 0;
	if ( ! WC_Woo_Update_Manager_Plugin::is_plugin_installed() || ! WC_Woo_Update_Manager_Plugin::is_plugin_active() ) {
		++$count;
	}

	return $count;
}