Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ps_mainmenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ public function install($delete_params = true)
!$this->registerHook('actionObjectProductDeleteAfter') ||
!$this->registerHook('actionObjectProductAddAfter') ||
!$this->registerHook('actionCategoryUpdate') ||
!$this->registerHook('actionMetaPageSave') ||
!$this->registerHook('actionShopDataDuplication') ||
!$this->registerHook('displayTop')) {
return false;
Expand Down Expand Up @@ -990,6 +991,11 @@ public function hookActionCategoryUpdate($params)
$this->clearMenuCache();
}

public function hookActionMetaPageSave($params)
{
$this->clearMenuCache();
}

protected function getCacheDirectory()
{
$dir = _PS_CACHE_DIR_ . 'ps_mainmenu';
Expand Down
3 changes: 2 additions & 1 deletion upgrade/upgrade-2.3.5.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@
function upgrade_module_2_3_5($module)
{
return Db::getInstance()->execute('INSERT IGNORE INTO `' . _DB_PREFIX_ . "hook` (`name`, `title`, `description`) VALUES
('actionMainMenuModifier', 'Modify main menu view data', 'This hook allows to alter main menu data')");
('actionMainMenuModifier', 'Modify main menu view data', 'This hook allows to alter main menu data')")
&& $module->registerHook('actionMetaPageSave');
}