WC_Helper::_woo_core_update_available
Whether WooCommerce has an update available.
Method of the class: WC_Helper{}
No Hooks.
Returns
true|false. True if a Woo core update is available.
Usage
$result = WC_Helper::_woo_core_update_available();
WC_Helper::_woo_core_update_available() WC Helper:: woo core update available code WC 10.6.2
private static function _woo_core_update_available() {
$updates = get_site_transient( 'update_plugins' );
if ( empty( $updates->response ) ) {
return false;
}
if ( empty( $updates->response['woocommerce/woocommerce.php'] ) ) {
return false;
}
$data = $updates->response['woocommerce/woocommerce.php'];
if ( version_compare( Constants::get_constant( 'WC_VERSION' ), $data->new_version, '>=' ) ) {
return false;
}
return true;
}