* @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ namespace PrestaShop\Module\PsAccounts\Hook; use Cache; use ShopUrl; class ActionObjectShopUrlUpdateAfter extends ActionObjectShopUpdateAfter { /** * @param array $params * * @return bool */ public function execute(array $params = []) { /** @var ShopUrl $shopUrl */ $shopUrl = $params['object']; if ($shopUrl->main) { Cache::clean('Shop::setUrl_' . (int) $shopUrl->id); $this->updateUserShop(new \Shop($shopUrl->id_shop)); } return true; } }