File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
app/code/Magento/CatalogUrlRewrite/Model/Category/Plugin/Category Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ public function __construct(
60
60
}
61
61
62
62
/**
63
- * Perform url updating for different stores
63
+ * Perform url updating for different stores.
64
64
*
65
65
* @param CategoryResource $subject
66
66
* @param CategoryResource $result
@@ -76,7 +76,8 @@ public function afterSave(
76
76
$ parentCategoryId = $ category ->getParentId ();
77
77
if ($ category ->isObjectNew ()
78
78
&& !$ category ->isInRootCategoryList ()
79
- && !empty ($ parentCategoryId )) {
79
+ && !empty ($ parentCategoryId )
80
+ ) {
80
81
foreach ($ category ->getStoreIds () as $ storeId ) {
81
82
if (!$ this ->isGlobalScope ((int )$ storeId )
82
83
&& $ this ->storeViewService ->doesEntityHaveOverriddenUrlPathForStore (
@@ -96,17 +97,19 @@ public function afterSave(
96
97
}
97
98
98
99
/**
99
- * Check that store id is in global scope
100
+ * Check that store id is in global scope.
100
101
*
101
102
* @param int $storeId
102
103
* @return bool
103
104
*/
104
105
private function isGlobalScope (int $ storeId ): bool
105
106
{
106
- return null === $ storeId || $ storeId === Store::DEFAULT_STORE_ID ;
107
+ return $ storeId === Store::DEFAULT_STORE_ID ;
107
108
}
108
109
109
110
/**
111
+ * Updates category url path.
112
+ *
110
113
* @param Category $category
111
114
* @param CategoryResource $categoryResource
112
115
* @return void
You can’t perform that action at this time.
0 commit comments