Skip to content

Commit

Permalink
fix service container fetching
Browse files Browse the repository at this point in the history
  • Loading branch information
matthieu-rolland committed Nov 12, 2024
1 parent dbefe54 commit 4295f87
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion classes/Hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -1123,7 +1123,11 @@ private static function getHookRegistry()
*/
private static function getHookModuleFilter()
{
$serviceContainer = ContainerBuilder::getContainer('front', _PS_MODE_DEV_);
$serviceContainer = SymfonyContainer::getInstance();

if (is_null($serviceContainer)) {
$serviceContainer = ContainerBuilder::getContainer('front', _PS_MODE_DEV_);
}

try {
$hookModuleFilter = $serviceContainer->get('prestashop.hook.module.filter');
Expand Down

0 comments on commit 4295f87

Please sign in to comment.