fix: Dashboard path and guest wishlist access
Issue 1 - Dashboard Always Active: Problem: Dashboard menu showed active on all routes Root Cause: Navigation tree used path='/' which matched all routes Solution: Changed dashboard path from '/' to '/dashboard' in NavigationRegistry - Main menu path: '/' → '/dashboard' - Overview submenu: '/' → '/dashboard' - SPA already had redirect from '/' to '/dashboard' Result: Dashboard only active on dashboard routes ✅ Issue 2 - Guest Wishlist Blocked: Problem: Heart icon required login despite enable_guest_wishlist setting Root Cause: Wishlist icon had user?.isLoggedIn check in frontend Solution: Removed isLoggedIn check from wishlist icon visibility - Backend already checks enable_guest_wishlist setting in check_permission() - Frontend now shows icon when module enabled + show_in_header setting - Guests can click and access wishlist (backend enforces permission) Result: Guest wishlist fully functional ✅ Files Modified (2): - includes/Compat/NavigationRegistry.php (dashboard path) - customer-spa/src/layouts/BaseLayout.tsx (removed login check) - admin-spa/dist/app.js + customer-spa/dist/app.js (rebuilt) Both issues resolved!
This commit is contained in:
@@ -109,10 +109,10 @@ class NavigationRegistry {
|
||||
[
|
||||
'key' => 'dashboard',
|
||||
'label' => __('Dashboard', 'woonoow'),
|
||||
'path' => '/',
|
||||
'path' => '/dashboard',
|
||||
'icon' => 'layout-dashboard',
|
||||
'children' => [
|
||||
['label' => __('Overview', 'woonoow'), 'mode' => 'spa', 'path' => '/', 'exact' => true],
|
||||
['label' => __('Overview', 'woonoow'), 'mode' => 'spa', 'path' => '/dashboard', 'exact' => true],
|
||||
['label' => __('Revenue', 'woonoow'), 'mode' => 'spa', 'path' => '/dashboard/revenue'],
|
||||
['label' => __('Orders', 'woonoow'), 'mode' => 'spa', 'path' => '/dashboard/orders'],
|
||||
['label' => __('Products', 'woonoow'), 'mode' => 'spa', 'path' => '/dashboard/products'],
|
||||
|
||||
Reference in New Issue
Block a user