Exclude privacy page from the store pages -- it is a core page (#50608)

* Exclude privacy page from the store pages -- it is a core page

* Add changefile(s) from automation for the following project(s): woocommerce

* Remove privacy page deletion in unit test

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
This commit is contained in:
Moon 2024-08-12 20:34:18 -07:00 committed by GitHub
parent 0468bdbe82
commit 9ff42c8b09
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 2 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: fix
Comment: Removed the privacy page from the store pages list to make it accessible when the 'Coming Soon' mode is enabled with the 'Restrict to store pages only' option.

View File

@ -155,7 +155,6 @@ class WCAdminHelper {
'shop' => wc_get_page_id( 'shop' ),
'cart' => wc_get_page_id( 'cart' ),
'checkout' => wc_get_page_id( 'checkout' ),
'privacy' => wc_privacy_policy_page_id(),
'terms' => wc_terms_and_conditions_page_id(),
'coming_soon' => wc_get_page_id( 'coming_soon' ),
);

View File

@ -44,7 +44,6 @@ class WC_Admin_Tests_Admin_Helper extends WC_Unit_Test_Case {
wp_delete_post( get_option( 'woocommerce_cart_page_id' ), true );
wp_delete_post( get_option( 'woocommerce_checkout_page_id' ), true );
wp_delete_post( get_option( 'woocommerce_myaccount_page_id' ), true );
wp_delete_post( wc_privacy_policy_page_id(), true );
wp_delete_post( wc_terms_and_conditions_page_id(), true );
}