fix(spa-nav): refresh navigation immediately when modules are toggled

This commit is contained in:
Dwindi Ramadhana
2026-06-01 00:58:18 +07:00
parent 5b8882e595
commit 30f2fc2ea6
5 changed files with 59 additions and 17 deletions

View File

@@ -151,6 +151,10 @@ class ModulesController extends WP_REST_Controller {
'success' => true,
'module_id' => $module_id,
'enabled' => $enabled,
'enabled_modules' => ModuleRegistry::get_enabled_modules(),
'nav_tree' => class_exists('\WooNooW\Compat\NavigationRegistry')
? \WooNooW\Compat\NavigationRegistry::get_frontend_nav_tree()
: [],
]);
}