Skip to content

Commit

Permalink
Refactored the website_ids array
Browse files Browse the repository at this point in the history
  • Loading branch information
eduard13 committed Sep 23, 2018
1 parent 765f88f commit 558d527
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/code/Magento/Catalog/Model/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,8 @@ public function getStoreIds()
if (!$this->hasStoreIds()) {
$storeIds = [];
if ($websiteIds = $this->getWebsiteIds()) {
foreach ($websiteIds as $websiteId => $selectedId) {
$websiteIds = array_keys($websiteIds);
foreach ($websiteIds as $websiteId) {
$websiteStores = $this->_storeManager->getWebsite($websiteId)->getStoreIds();
$storeIds = array_merge($storeIds, $websiteStores);
}
Expand Down

0 comments on commit 558d527

Please sign in to comment.