diff --git a/plugins/woocommerce-admin/bin/modified-editsite-lock-unlock.js b/plugins/woocommerce-admin/bin/modified-editsite-lock-unlock.js index a9f0ec06e02..499d4e6e54e 100644 --- a/plugins/woocommerce-admin/bin/modified-editsite-lock-unlock.js +++ b/plugins/woocommerce-admin/bin/modified-editsite-lock-unlock.js @@ -3,16 +3,27 @@ */ import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis'; -let consentString = +const oldConsentString = 'I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.'; +const newConsentString = + 'I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.'; -if ( window.wcSettings && window.wcSettings.wpVersion ) { - // Parse the version string as a floating-point number - const wpVersion = parseFloat( window.wcSettings.wpVersion ); - if ( ! isNaN( wpVersion ) && wpVersion >= 6.4 ) { - consentString = - 'I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.'; - } +let consentString = oldConsentString; +const wcSettings = window.wcSettings; +const admin = wcSettings?.admin; + +const wpVersion = parseFloat( wcSettings?.wpVersion ); +const gutenbergVersion = parseFloat( admin?.gutenberg_version ); + +// Use the new consent string if the WP version is 6.4 and above +if ( ! isNaN( wpVersion ) && wpVersion >= 6.4 ) { + consentString = newConsentString; +} + +// Users can install the latest Gutenberg plugin manually +// Use the new consent string for Gutenberg 16.9 and above +if ( ! isNaN( gutenbergVersion ) && gutenbergVersion >= 16.9 ) { + consentString = newConsentString; } export const { lock, unlock } = diff --git a/plugins/woocommerce/changelog/41052-update-40840-customize-blank-issue-with-wp-6.4-followup b/plugins/woocommerce/changelog/41052-update-40840-customize-blank-issue-with-wp-6.4-followup new file mode 100644 index 00000000000..df7f8606a81 --- /dev/null +++ b/plugins/woocommerce/changelog/41052-update-40840-customize-blank-issue-with-wp-6.4-followup @@ -0,0 +1,4 @@ +Significance: minor +Type: fix + +Fix blank assember hub (CYS) issue on WP 6.3 + latest Gutenberg. diff --git a/plugins/woocommerce/src/Internal/Admin/Settings.php b/plugins/woocommerce/src/Internal/Admin/Settings.php index 24dc4b60b00..8b3c7fcdee4 100644 --- a/plugins/woocommerce/src/Internal/Admin/Settings.php +++ b/plugins/woocommerce/src/Internal/Admin/Settings.php @@ -239,6 +239,8 @@ class Settings { $settings['isWooPayEligible'] = WCPayPromotionInit::is_woopay_eligible(); + $settings['gutenberg_version'] = defined( 'GUTENBERG_VERSION' ) ? constant( 'GUTENBERG_VERSION' ) : 0; + return $settings; }