| @@ -23,22 +23,8 @@ | ||
| 23 | 23 | add_action('fluent_cart/loading_app', function () { |
| 24 | 24 | Vite::enqueueScript('fluent_cart_attributes', 'attributes/attributes.js'); |
| 25 | 25 | }); |
| 26 | 26 | |
| 27 | - // Hide the Attributes submenu item by default on FluentCart admin | |
| 28 | - // pages. useNavigationMenuUpdateService toggles it back on whenever the | |
| 29 | - // active route's active_menu is 'products', matching the behavior of | |
| 30 | - // the existing "↳ Inventory" child. | |
| 31 | - add_action('admin_enqueue_scripts', function () { | |
| 32 | - wp_register_style('fluent-cart-admin', false); | |
| 33 | - wp_enqueue_style('fluent-cart-admin'); | |
| 34 | - wp_add_inline_style('fluent-cart-admin', ' | |
| 35 | - .toplevel_page_fluent-cart li.fluent_cart_attributes { | |
| 36 | - display: none; | |
| 37 | - } | |
| 38 | - '); | |
| 39 | - }); | |
| 40 | - | |
| 41 | 27 | // Show Attributes under Products in the WP admin left sidebar. |
| 42 | 28 | add_action('fluent_cart/admin_submenu_added', function () { |
| 43 | 29 | global $submenu; |
| 44 | 30 | if (!isset($submenu['fluent-cart'])) { |
| @@ -52,9 +38,9 @@ | ||
| 52 | 38 | |
| 53 | 39 | $entry = [ |
| 54 | 40 | __('↳ Attributes', 'fluent-cart'), |
| 55 | 41 | $capability, |
| 56 | - 'admin.php?page=fluent-cart#/attributes', | |
| 42 | + 'admin.php?page=fluent-cart#/products/attributes', | |
| 57 | 43 | '', |
| 58 | 44 | 'fluent_cart_attributes', |
| 59 | 45 | ]; |
| 60 | 46 | |