WC_Helper_Updater::get_updates_count_based_on_site_status
Get the update count to based on the status of the site.
Method of the class: WC_Helper_Updater{}
No Hooks.
Returns
Int.
Usage
$result = WC_Helper_Updater::get_updates_count_based_on_site_status();
WC_Helper_Updater::get_updates_count_based_on_site_status() WC Helper Updater::get updates count based on site status code WC 10.6.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;
}