Skip to content

Commit

Permalink
Reversed change
Browse files Browse the repository at this point in the history
  • Loading branch information
Barny Shergold authored and Barny Shergold committed Jun 22, 2020
1 parent ac1ac06 commit e100822
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ public function getUrlPath($category, $parentCategory = null)
if (in_array($category->getParentId(), [Category::ROOT_CATEGORY_ID, Category::TREE_ROOT_ID])) {
return '';
}

$path = $category->getUrlPath();
if ($path !== null && !$category->dataHasChangedFor('url_key') && !$category->dataHasChangedFor('parent_id')) {
return $path;
}
$path = $category->getUrlKey();
if ($path === false) {
return $category->getUrlPath();
Expand Down

0 comments on commit e100822

Please sign in to comment.