From d951d30526f4b04ef23d32d379b8a1e7847348fe Mon Sep 17 00:00:00 2001 From: Benjamin Freoua Date: Tue, 1 Oct 2024 17:51:54 +0200 Subject: [PATCH] fix: setContainer Ps Account install module --- alma/alma.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/alma/alma.php b/alma/alma.php index 68edbe47..76744914 100644 --- a/alma/alma.php +++ b/alma/alma.php @@ -223,6 +223,7 @@ public function install() { try { $this->checkCompatibilityPSModule(); + $this->setContainer(); $this->getService('alma.ps_accounts_installer')->install(); } catch (\Alma\PrestaShop\Exceptions\CompatibilityPsAccountException $e) { \Alma\PrestaShop\Logger::instance()->info($e->getMessage()); @@ -258,6 +259,14 @@ public function getService($serviceName) return $this->container->getService($serviceName); } + public function setContainer() + { + $this->container = new \PrestaShop\ModuleLibServiceContainer\DependencyInjection\ServiceContainer( + $this->name, + $this->getLocalPath() + ); + } + /** * @return bool * @@ -599,10 +608,7 @@ public function getContent() public function renderPSAccount() { $this->checkCompatibilityPSModule(); - $this->container = new \PrestaShop\ModuleLibServiceContainer\DependencyInjection\ServiceContainer( - $this->name, - $this->getLocalPath() - ); + $this->setContainer(); try { $accountsFacade = $this->getService('alma.ps_accounts_facade');