[LYS] Allow login pages to work in Coming soon mode (#46569)

This commit is contained in:
Paul Sealock 2024-04-16 12:46:11 +12:00 committed by GitHub
parent f5a4cd05dd
commit 6116f01dc7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 8 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: fix
Comment: Fix previously unreleased feature

View File

@ -128,7 +128,6 @@ class WCAdminHelper {
* *
* Store pages are defined as: * Store pages are defined as:
* *
* - My Account
* - Shop * - Shop
* - Cart * - Cart
* - Checkout * - Checkout
@ -153,12 +152,11 @@ class WCAdminHelper {
// WC store pages. // WC store pages.
$store_pages = array( $store_pages = array(
'myaccount' => wc_get_page_id( 'myaccount' ), 'shop' => wc_get_page_id( 'shop' ),
'shop' => wc_get_page_id( 'shop' ), 'cart' => wc_get_page_id( 'cart' ),
'cart' => wc_get_page_id( 'cart' ), 'checkout' => wc_get_page_id( 'checkout' ),
'checkout' => wc_get_page_id( 'checkout' ), 'privacy' => wc_privacy_policy_page_id(),
'privacy' => wc_privacy_policy_page_id(), 'terms' => wc_terms_and_conditions_page_id(),
'terms' => wc_terms_and_conditions_page_id(),
); );
/** /**

View File

@ -221,7 +221,6 @@ class WC_Admin_Tests_Admin_Helper extends WC_Unit_Test_Case {
public function get_store_page_test_data() { public function get_store_page_test_data() {
return array( return array(
array( get_permalink( wc_get_page_id( 'cart' ) ), true ), // Test case 1: URL matches cart page. array( get_permalink( wc_get_page_id( 'cart' ) ), true ), // Test case 1: URL matches cart page.
array( get_permalink( wc_get_page_id( 'myaccount' ) ) . '/orders/', true ), // Test case 2: URL matches my account > orders page.
array( 'https://example.com/product-category/sample-category/', true ), // Test case 3: URL matches product category page. array( 'https://example.com/product-category/sample-category/', true ), // Test case 3: URL matches product category page.
array( 'https://example.com/product-tag/sample-tag/', true ), // Test case 4: URL matches product tag page. array( 'https://example.com/product-tag/sample-tag/', true ), // Test case 4: URL matches product tag page.
array( 'https://example.com/shop/uncategorized/test/', true ), // Test case 5: URL matches product page. array( 'https://example.com/shop/uncategorized/test/', true ), // Test case 5: URL matches product page.