File tree Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types=1 );
4
+
5
+ namespace CustomGento \DefaultStoreCodeRemover \Helper ;
6
+
7
+ use Magento \Store \Api \Data \StoreInterface ;
8
+ use Magento \Store \Model \Store ;
9
+ use MageWorx \SeoBase \Helper \StoreUrl as MageworxStoreUrl ;
10
+
11
+ class StoreUrl extends MageworxStoreUrl
12
+ {
13
+ protected function isUseStoreCodeInUrl (StoreInterface $ store ): bool
14
+ {
15
+ if ($ store ->getCode () !== Store::ADMIN_CODE && $ store ->isDefault ()) {
16
+ return false ;
17
+ }
18
+
19
+ $ storeId = (int )$ store ->getId ();
20
+
21
+ return !($ store ->hasDisableStoreInUrl () && $ store ->getDisableStoreInUrl ())
22
+ && $ this ->configDataLoader ->getConfigValue (Store::XML_PATH_STORE_IN_URL , $ storeId );
23
+ }
24
+ }
Original file line number Diff line number Diff line change 3
3
<type name =" Magento\Store\Model\Store" >
4
4
<plugin name =" hide_default_store_code" type =" CustomGento\DefaultStoreCodeRemover\Plugin\Store\HideDefaultStoreCodePlugin" />
5
5
</type >
6
- </config >
6
+
7
+ <preference for =" MageWorx\SeoBase\Helper\StoreUrl" type =" CustomGento\DefaultStoreCodeRemover\Helper\StoreUrl" />
8
+ </config >
You can’t perform that action at this time.
0 commit comments