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(
73
73
$ afterCategoryId
74
74
) {
75
75
$ 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
- }
85
76
$ 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 );
86
83
87
84
return $ result ;
88
85
}
You can’t perform that action at this time.
0 commit comments