From 43aaa8f1449192f17ac44dc3fe75952a8778c5a0 Mon Sep 17 00:00:00 2001 From: John Hughes Date: Thu, 6 Sep 2018 16:16:44 +0100 Subject: [PATCH] Add comment to plugin --- Plugin/RemoveCategoriesFromProductUrlRewriteGeneration.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Plugin/RemoveCategoriesFromProductUrlRewriteGeneration.php b/Plugin/RemoveCategoriesFromProductUrlRewriteGeneration.php index 8a3e83a..2cb6ebf 100644 --- a/Plugin/RemoveCategoriesFromProductUrlRewriteGeneration.php +++ b/Plugin/RemoveCategoriesFromProductUrlRewriteGeneration.php @@ -41,6 +41,7 @@ public function beforeGenerateForSpecificStoreView( $rootCategoryId = null ): array { if (!$this->config->generateCategoryUrlsForProductRewrites($storeId)) { + // Unset product categories to stop needless category path rewrites being created $productCategories = []; } return [$storeId, $productCategories, $product, $rootCategoryId];