File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -325,26 +325,24 @@ protected function isRuleWilBeAppliedForSpecificProduct(array $params): bool
325325 private function getDefaultStoreIds ($ rule ): array
326326 {
327327 $ defaultStoreIds = [];
328-
329328 $ storeIds = (array )$ rule ->getStoreIds ();
330329
331330 // [website_id => default_store_id]
332- $ websiteIdToDefaultStoreIdMap = $ this ->getWebsitesMap ->execute ();
331+ $ websiteToDefaultStoreMap = $ this ->getWebsitesMap ->execute ();
333332
334333 if (in_array (0 , $ storeIds )) {
335- $ defaultStoreIds = $ websiteIdToDefaultStoreIdMap ;
334+ $ defaultStoreIds = $ websiteToDefaultStoreMap ;
336335 } else {
337336 $ storeManager = \Magento \Framework \App \ObjectManager::getInstance ()->get (\Magento \Store \Model \StoreManagerInterface::class);
338337
339338 foreach ($ storeIds as $ id ) {
340-
341339 $ websiteId = $ storeManager ->getStore ($ id )->getWebsiteId ();
342340 $ websiteIds [$ websiteId ] = $ websiteId ;
343341 }
344342
345343 foreach ($ websiteIds as $ websiteId ) {
346- if (isset ($ websiteIdToDefaultStoreIdMap [$ websiteId ])) {
347- $ defaultStoreIds [] = $ websiteIdToDefaultStoreIdMap [$ websiteId ];
344+ if (isset ($ websiteToDefaultStoreMap [$ websiteId ])) {
345+ $ defaultStoreIds [] = $ websiteToDefaultStoreMap [$ websiteId ];
348346 }
349347 }
350348 }
You can’t perform that action at this time.
0 commit comments