Skip to content

Commit dce6e9d

Browse files
authored
Do not use store code in URLs when site is in single store mode
1 parent abe22bc commit dce6e9d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/code/Magento/Store/Model/Store.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
use Magento\Framework\Url\ScopeInterface as UrlScopeInterface;
2222
use Magento\Framework\UrlInterface;
2323
use Magento\Store\Api\Data\StoreInterface;
24+
use Magento\Store\Model\StoreManager;
2425

2526
/**
2627
* Store model
@@ -760,6 +761,7 @@ protected function _updatePathUseStoreView($url)
760761
public function isUseStoreInUrl()
761762
{
762763
return !($this->hasDisableStoreInUrl() && $this->getDisableStoreInUrl())
764+
&& !$this->getConfig(StoreManager::XML_PATH_SINGLE_STORE_MODE_ENABLED)
763765
&& $this->getConfig(self::XML_PATH_STORE_IN_URL);
764766
}
765767

0 commit comments

Comments
 (0)