Skip to content

Commit

Permalink
Fix #29879 Breadcrump Undefined class constant 'XML_PATH_CATEGORY_URL…
Browse files Browse the repository at this point in the history
…_SUFFIX'

When creating a plugin, that is calling the public functions for the
product breadcrump they ending up throwing an error message, because
this constants has been marked as private recently.

This is fixing it with referencing to the current instance and all is
working again. This fix is analog to another bug of the same type:

#28981
#28797

This should resolve:
#29879
  • Loading branch information
toxix committed Sep 7, 2020
1 parent f3a160c commit 2d1d097
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/code/Magento/Catalog/ViewModel/Product/Breadcrumbs.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function __construct(
public function getCategoryUrlSuffix()
{
return $this->scopeConfig->getValue(
static::XML_PATH_CATEGORY_URL_SUFFIX,
self::XML_PATH_CATEGORY_URL_SUFFIX,
ScopeInterface::SCOPE_STORE
);
}
Expand All @@ -84,7 +84,7 @@ public function getCategoryUrlSuffix()
public function isCategoryUsedInProductUrl(): bool
{
return $this->scopeConfig->isSetFlag(
static::XML_PATH_PRODUCT_USE_CATEGORIES,
self::XML_PATH_PRODUCT_USE_CATEGORIES,
ScopeInterface::SCOPE_STORE
);
}
Expand Down

0 comments on commit 2d1d097

Please sign in to comment.