feat: implement header/footer visibility controls for checkout and thankyou pages
- Created LayoutWrapper component to conditionally render header/footer based on route - Created MinimalHeader component (logo only) - Created MinimalFooter component (trust badges + policy links) - Created usePageVisibility hook to get visibility settings per page - Wrapped ClassicLayout with LayoutWrapper for conditional rendering - Header/footer visibility now controlled directly in React SPA - Settings: show/minimal/hide for both header and footer - Background color support for checkout and thankyou pages
This commit is contained in:
@@ -13,7 +13,7 @@ if ( ! defined('ABSPATH') ) exit;
|
||||
*/
|
||||
class NavigationRegistry {
|
||||
const NAV_OPTION = 'wnw_nav_tree';
|
||||
const NAV_VERSION = '1.0.1'; // Bumped to add Customer SPA settings
|
||||
const NAV_VERSION = '1.0.7'; // Removed 'New Coupon' from submenu
|
||||
|
||||
/**
|
||||
* Initialize hooks
|
||||
@@ -145,16 +145,6 @@ class NavigationRegistry {
|
||||
['label' => __('Attributes', 'woonoow'), 'mode' => 'spa', 'path' => '/products/attributes'],
|
||||
],
|
||||
],
|
||||
[
|
||||
'key' => 'coupons',
|
||||
'label' => __('Coupons', 'woonoow'),
|
||||
'path' => '/coupons',
|
||||
'icon' => 'tag',
|
||||
'children' => [
|
||||
['label' => __('All coupons', 'woonoow'), 'mode' => 'spa', 'path' => '/coupons'],
|
||||
['label' => __('New', 'woonoow'), 'mode' => 'spa', 'path' => '/coupons/new'],
|
||||
],
|
||||
],
|
||||
[
|
||||
'key' => 'customers',
|
||||
'label' => __('Customers', 'woonoow'),
|
||||
@@ -165,6 +155,33 @@ class NavigationRegistry {
|
||||
['label' => __('New', 'woonoow'), 'mode' => 'spa', 'path' => '/customers/new'],
|
||||
],
|
||||
],
|
||||
[
|
||||
'key' => 'marketing',
|
||||
'label' => __('Marketing', 'woonoow'),
|
||||
'path' => '/marketing',
|
||||
'icon' => 'mail',
|
||||
'children' => [
|
||||
['label' => __('Newsletter', 'woonoow'), 'mode' => 'spa', 'path' => '/marketing/newsletter'],
|
||||
['label' => __('Coupons', 'woonoow'), 'mode' => 'spa', 'path' => '/coupons'],
|
||||
],
|
||||
],
|
||||
[
|
||||
'key' => 'appearance',
|
||||
'label' => __('Appearance', 'woonoow'),
|
||||
'path' => '/appearance',
|
||||
'icon' => 'palette',
|
||||
'children' => [
|
||||
['label' => __('General', 'woonoow'), 'mode' => 'spa', 'path' => '/appearance/general'],
|
||||
['label' => __('Header', 'woonoow'), 'mode' => 'spa', 'path' => '/appearance/header'],
|
||||
['label' => __('Footer', 'woonoow'), 'mode' => 'spa', 'path' => '/appearance/footer'],
|
||||
['label' => __('Shop', 'woonoow'), 'mode' => 'spa', 'path' => '/appearance/shop'],
|
||||
['label' => __('Product', 'woonoow'), 'mode' => 'spa', 'path' => '/appearance/product'],
|
||||
['label' => __('Cart', 'woonoow'), 'mode' => 'spa', 'path' => '/appearance/cart'],
|
||||
['label' => __('Checkout', 'woonoow'), 'mode' => 'spa', 'path' => '/appearance/checkout'],
|
||||
['label' => __('Thank You', 'woonoow'), 'mode' => 'spa', 'path' => '/appearance/thankyou'],
|
||||
['label' => __('My Account', 'woonoow'), 'mode' => 'spa', 'path' => '/appearance/account'],
|
||||
],
|
||||
],
|
||||
[
|
||||
'key' => 'settings',
|
||||
'label' => __('Settings', 'woonoow'),
|
||||
@@ -191,7 +208,6 @@ class NavigationRegistry {
|
||||
['label' => __('Tax', 'woonoow'), 'mode' => 'spa', 'path' => '/settings/tax'],
|
||||
['label' => __('Customers', 'woonoow'), 'mode' => 'spa', 'path' => '/settings/customers'],
|
||||
['label' => __('Notifications', 'woonoow'), 'mode' => 'spa', 'path' => '/settings/notifications'],
|
||||
['label' => __('Customer SPA', 'woonoow'), 'mode' => 'spa', 'path' => '/settings/customer-spa'],
|
||||
['label' => __('Developer', 'woonoow'), 'mode' => 'spa', 'path' => '/settings/developer'],
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user