diff --git a/Helper/Store.php b/Helper/Store.php index de924e93..b6be382a 100644 --- a/Helper/Store.php +++ b/Helper/Store.php @@ -111,7 +111,7 @@ public function getStores($arrayKey = 'store_id') continue; } - if ($this->storeManager->isSingleStoreMode() && (int)$websiteId !== 0) { + if ($this->isSingleStoreMode() && (int)$websiteId !== 0) { continue; } @@ -195,6 +195,14 @@ public function getStores($arrayKey = 'store_id') return $data; } + /** + * @return bool + */ + public function isSingleStoreMode(): bool + { + return $this->storeManager->isSingleStoreMode(); + } + /** * Retrieve all store combination * diff --git a/Job/Option.php b/Job/Option.php index c3193829..c5ac0904 100644 --- a/Job/Option.php +++ b/Job/Option.php @@ -532,7 +532,7 @@ public function insertSwatchOption(): void /** @var string $value */ $value = 'labels-' . $local; - if ($this->configHelper->getOptionCodeAsAdminLabel() && $store['store_id'] == 0) { + if (!$this->storeHelper->isSingleStoreMode() && $this->configHelper->getOptionCodeAsAdminLabel() && $store['store_id'] == 0) { $value = 'code'; }