File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
app/code/Magento/CatalogUrlRewrite/Model/Category/Plugin/Category Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -73,16 +73,13 @@ public function afterChangeParent(
7373 $ afterCategoryId
7474 ) {
7575 $ categoryStoreId = $ category ->getStoreId ();
76- foreach ($ category ->getStoreIds () as $ storeId ) {
77- $ category ->setStoreId ($ categoryStoreId == $ storeId ? $ storeId : $ categoryStoreId );
78- $ this ->removeObsoleteUrlPathEntries ($ category );
79- $ this ->updateCategoryUrlKeyForStore ($ category );
80- $ category ->unsUrlPath ();
81- $ category ->setUrlPath ($ this ->categoryUrlPathGenerator ->getUrlPath ($ category ));
82- $ category ->getResource ()->saveAttribute ($ category , 'url_path ' );
83- $ this ->updateUrlPathForChildren ($ category );
84- }
8576 $ category ->setStoreId ($ categoryStoreId );
77+ $ this ->removeObsoleteUrlPathEntries ($ category );
78+ $ this ->updateCategoryUrlKeyForStore ($ category );
79+ $ category ->unsUrlPath ();
80+ $ category ->setUrlPath ($ this ->categoryUrlPathGenerator ->getUrlPath ($ category ));
81+ $ category ->getResource ()->saveAttribute ($ category , 'url_path ' );
82+ $ this ->updateUrlPathForChildren ($ category );
8683
8784 return $ result ;
8885 }
You can’t perform that action at this time.
0 commit comments