From 7ee8e09fdf8d2d88eca262688b5bf14170b124c6 Mon Sep 17 00:00:00 2001 From: Barny Shergold Date: Wed, 8 Jul 2020 09:42:42 +0100 Subject: [PATCH] Updated code as per failed test --- .../CatalogUrlRewrite/Model/ProductScopeRewriteGenerator.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/CatalogUrlRewrite/Model/ProductScopeRewriteGenerator.php b/app/code/Magento/CatalogUrlRewrite/Model/ProductScopeRewriteGenerator.php index cf01c825e9231..165f9c07127e7 100644 --- a/app/code/Magento/CatalogUrlRewrite/Model/ProductScopeRewriteGenerator.php +++ b/app/code/Magento/CatalogUrlRewrite/Model/ProductScopeRewriteGenerator.php @@ -237,8 +237,11 @@ public function isCategoryProperForGenerating(Category $category, $storeId) } /** - * Checks if URL key has been changed for provided category and returns reloaded category in other case - returns provided category. + * Check if URL key has been changed * + * Checks if URL key has been changed for provided category and returns reloaded category, + * in other case - returns provided category. + * * Category should be loaded per appropriate store at all times. This is because whilst the URL key on the * category in focus might be unchanged, parent category URL keys might be. If the category store ID * and passed store ID are the same then return current category as it is correct but may have changed in memory