From ef4ecd286a9bfb6469764dc3cb8a7f91c976378a Mon Sep 17 00:00:00 2001 From: Paul Sealock Date: Thu, 11 Apr 2024 10:37:24 +1200 Subject: [PATCH] [LYS] Coming Soon template tweaks (#46402) * Update social link urls * Align wide * hide banner on Coming soon page * Add changefile(s) from automation for the following project(s): woocommerce --------- Co-authored-by: github-actions --- .../changelog/46402-fix-coming-soon0-template-tweaks | 4 ++++ .../src/Admin/Features/LaunchYourStore.php | 12 ++++++++++-- .../blockified/coming-soon-entire-site.html | 6 +++--- .../templates/templates/coming-soon-entire-site.html | 7 ++++--- 4 files changed, 21 insertions(+), 8 deletions(-) create mode 100644 plugins/woocommerce/changelog/46402-fix-coming-soon0-template-tweaks diff --git a/plugins/woocommerce/changelog/46402-fix-coming-soon0-template-tweaks b/plugins/woocommerce/changelog/46402-fix-coming-soon0-template-tweaks new file mode 100644 index 00000000000..d44024ba4c1 --- /dev/null +++ b/plugins/woocommerce/changelog/46402-fix-coming-soon0-template-tweaks @@ -0,0 +1,4 @@ +Significance: patch +Type: update +Comment: Update unreleased feature + diff --git a/plugins/woocommerce/src/Admin/Features/LaunchYourStore.php b/plugins/woocommerce/src/Admin/Features/LaunchYourStore.php index 09ca19607df..36e182fd917 100644 --- a/plugins/woocommerce/src/Admin/Features/LaunchYourStore.php +++ b/plugins/woocommerce/src/Admin/Features/LaunchYourStore.php @@ -153,8 +153,8 @@ class LaunchYourStore { - -

%s

+ +

%s

@@ -228,6 +228,7 @@ class LaunchYourStore { * * - User must be either an admin or store editor (must be logged in). * - 'woocommerce_coming_soon' option value must be 'yes' + * - The page must not be the Coming soon page itself. */ public function maybe_add_coming_soon_banner_on_frontend() { // Do not show the banner if the site is being previewed. @@ -246,6 +247,13 @@ class LaunchYourStore { return false; } + // No need to show the banner on the Coming soon page itself. + $page_id = get_the_ID(); + $coming_soon_page_id = intval( get_option( 'woocommerce_coming_soon_page_id' ) ); + if ( $page_id === $coming_soon_page_id ) { + return false; + } + $link = admin_url( 'admin.php?page=wc-settings#wc_settings_general_site_visibility_slotfill' ); $text = sprintf( diff --git a/plugins/woocommerce/templates/templates/blockified/coming-soon-entire-site.html b/plugins/woocommerce/templates/templates/blockified/coming-soon-entire-site.html index c7a616315f6..caf138767df 100644 --- a/plugins/woocommerce/templates/templates/blockified/coming-soon-entire-site.html +++ b/plugins/woocommerce/templates/templates/blockified/coming-soon-entire-site.html @@ -10,11 +10,11 @@
-
diff --git a/plugins/woocommerce/templates/templates/coming-soon-entire-site.html b/plugins/woocommerce/templates/templates/coming-soon-entire-site.html index c7a616315f6..0e5fce37e2b 100644 --- a/plugins/woocommerce/templates/templates/coming-soon-entire-site.html +++ b/plugins/woocommerce/templates/templates/coming-soon-entire-site.html @@ -10,11 +10,11 @@
-
@@ -51,3 +51,4 @@ line-height: 26px; } + \ No newline at end of file