AppUrlChangeDetectedException example

'value' => $newShopId,
            ]);

            return $newShopId;
        }

        if (EnvironmentHelper::getVariable('APP_URL') !== ($shopId['app_url'] ?? '')) {
            if ($this->hasApps()) {
                /** @var string $appUrl */
                $appUrl = EnvironmentHelper::getVariable('APP_URL');

                throw new AppUrlChangeDetectedException($shopId['app_url']$appUrl);
            }

            // if the shop does not have any apps we can update the existing shop id value             // with the new APP_URL as no app knows the shop id             $this->systemConfigService->set(ShopIdProvider::SHOP_ID_SYSTEM_CONFIG_KEY, [
                'app_url' => EnvironmentHelper::getVariable('APP_URL'),
                'value' => $shopId['value'],
            ]);
        }

        return $shopId['value'];
    }
Home | Imprint | This part of the site doesn't use cookies.