Normalize installed WC Admin version when comparing. (https://github.com/woocommerce/woocommerce-admin/pull/6205)

This commit is contained in:
Moon 2021-01-27 15:58:06 -08:00 committed by GitHub
parent 7bf63fae05
commit ef20b35826
1 changed files with 4 additions and 0 deletions

View File

@ -38,6 +38,10 @@ class ManageStoreActivityFromHomeScreen {
*/
public static function get_note() {
$installed_version = get_option( 'woocommerce_admin_version' );
// the value can be in 1.9.0-rc.3 format for RC or BETA releases
// get the version without -rc.3.
$version_segments = explode( '-', $installed_version );
$installed_version = $version_segments[0];
if ( ! version_compare( $installed_version, '1.9.0', '=' ) ) {
return;
}