Prevent initializing coming soon feature if it's already initialized (#50668)

* Prevent initializing coming soon feature if store pages only

* Add changelog

* Improve check
This commit is contained in:
Chi-Hsuan Huang 2024-08-15 18:25:44 +08:00 committed by GitHub
parent 1806747254
commit bcf1a38a58
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: tweak
Prevent initializing coming soon feature if it's already initialized

View File

@ -128,6 +128,11 @@ class LaunchYourStore {
return;
}
if ( false === get_option( 'woocommerce_store_pages_only', false ) ) {
// Coming soon already initialized.
return false;
}
$coming_soon = 'yes';
$store_pages_only = WCAdminHelper::is_site_fresh() ? 'no' : 'yes';
$private_link = 'no';