Skip to content

Commit 0da86ab

Browse files
committed
Filter the product collection by the store id passed in
1 parent 32de280 commit 0da86ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/CatalogUrlRewrite/Observer/UrlRewriteHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ private function getCategoryProductsUrlRewrites(
246246
$productCollection = $this->productCollectionFactory->create();
247247

248248
$productCollection->addCategoriesFilter(['eq' => [$category->getEntityId()]])
249-
->setStoreId($storeId)
249+
->addStoreFilter($storeId)
250250
->addAttributeToSelect('name')
251251
->addAttributeToSelect('visibility')
252252
->addAttributeToSelect('url_key')

0 commit comments

Comments
 (0)