diff --git a/Plugin/Magento/Framework/App/Config/ScopeConfigInterfacePlugin.php b/Plugin/Magento/Framework/App/Config/ScopeConfigInterfacePlugin.php index c425e94c..6c2534e6 100644 --- a/Plugin/Magento/Framework/App/Config/ScopeConfigInterfacePlugin.php +++ b/Plugin/Magento/Framework/App/Config/ScopeConfigInterfacePlugin.php @@ -3,8 +3,8 @@ namespace Magefan\Blog\Plugin\Magento\Framework\App\Config; use Magento\Framework\App\Config\ScopeConfigInterface; -use Magento\Framework\App\RequestInterface; -use Magefan\Blog\Model\Config; +use Magento\Framework\App\RequestInterface\Proxy as RequestInterface; +use Magefan\Blog\Model\Config\Proxy as Config; class ScopeConfigInterfacePlugin { @@ -54,7 +54,7 @@ public function __construct( */ public function afterGetValue($subject, $result, $path, $scopeType = ScopeConfigInterface::SCOPE_TYPE_DEFAULT, $scopeCode = null) { - if ($path == 'mageworx_seo/base/canonical/canonical_ignore_pages' && $this->request->getModuleName() == 'blog') { + if ($path == 'mageworx_seo/base/canonical/canonical_ignore_pages' && $this->request->getModuleName() == 'blog' && $this->config->isEnabled()) { $blogPages = explode(",", $this->config->getConfig(Config::XML_PATH_DISPLAY_CANONICAL_TAG_FOR)); if (in_array('all', $blogPages)) {