Skip to content

Commit 5cae351

Browse files
committed
ACP2E-84: Mass attribute update creates URL rewrite for wrong store
1 parent 526300c commit 5cae351

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

app/code/Magento/CatalogUrlRewrite/Model/ProductScopeRewriteGenerator.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,6 @@ public function generateForGlobalScope($productCategories, Product $product, $ro
171171
public function generateForSpecificStoreView($storeId, $productCategories, Product $product, $rootCategoryId = null)
172172
{
173173
$mergeDataProvider = clone $this->mergeDataProviderPrototype;
174-
175-
if (!$this->isGlobalScope($storeId) && !$this->isProductBelongToStore($product, $storeId)) {
176-
return $mergeDataProvider->getData();
177-
}
178-
179174
$categories = [];
180175
foreach ($productCategories as $category) {
181176
if (!$this->isCategoryProperForGenerating($category, $storeId)) {
@@ -281,15 +276,4 @@ private function isCategoryRewritesEnabled()
281276
{
282277
return (bool)$this->config->getValue('catalog/seo/generate_category_product_rewrites');
283278
}
284-
285-
/**
286-
* Check if product is available for specified storeId
287-
*
288-
* @param Product $product
289-
* @param int $storeId
290-
* @return bool
291-
*/
292-
private function isProductBelongToStore(Product $product, int $storeId): bool {
293-
return in_array($storeId, $product->getStoreIds());
294-
}
295279
}

0 commit comments

Comments
 (0)