Skip to content

Commit

Permalink
Update Shop.php
Browse files Browse the repository at this point in the history
suggestions from pululuk
  • Loading branch information
Prestaworks committed May 19, 2022
1 parent e726bd7 commit 64194f3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion classes/shop/Shop.php
Expand Up @@ -396,7 +396,9 @@ public static function initialize()
Configuration::getMultiShopValues('PS_MEDIA_SERVER_3')
);

if ((!$id_shop && defined('_PS_ADMIN_DIR_')) || ('all' === $id_shop && defined('_PS_API_IN_USE_') && _PS_API_IN_USE_) || Tools::isPHPCLI() || in_array($http_host, $all_media)) {
$isAllShop = 'all' === $id_shop;
$isApiInUse = defined('_PS_API_IN_USE_') && _PS_API_IN_USE_;
if ((!$id_shop && defined('_PS_ADMIN_DIR_')) || ($isAllShop && $isApiInUse) || Tools::isPHPCLI() || in_array($http_host, $all_media)) {
// If in admin, we can access to the shop without right URL
if ((!$id_shop && Tools::isPHPCLI()) || defined('_PS_ADMIN_DIR_')) {
$id_shop = (int) Configuration::get('PS_SHOP_DEFAULT');
Expand Down

0 comments on commit 64194f3

Please sign in to comment.