Skip to content

Commit 7889a6f

Browse files
committed
Fix has been updated
1 parent cb4988a commit 7889a6f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

app/code/Magento/Customer/Block/Form/Register.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Magento\Customer\Model\AccountManagement;
1010
use Magento\Framework\App\ObjectManager;
1111
use Magento\Newsletter\Model\Config;
12+
use Magento\Store\Model\ScopeInterface;
1213

1314
/**
1415
* Customer register form block
@@ -184,7 +185,7 @@ public function getRegion()
184185
public function isNewsletterEnabled()
185186
{
186187
return $this->_moduleManager->isOutputEnabled('Magento_Newsletter')
187-
&& $this->newsLetterConfig->isActive();
188+
&& $this->newsLetterConfig->isActive(ScopeInterface::SCOPE_STORE);
188189
}
189190

190191
/**

app/code/Magento/Newsletter/Model/Config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function __construct(
4141
* @param string $scopeType
4242
* @return bool
4343
*/
44-
public function isActive(string $scopeType = \Magento\Store\Model\ScopeInterface::SCOPE_STORE): bool
44+
public function isActive(string $scopeType = ScopeConfigInterface::SCOPE_TYPE_DEFAULT): bool
4545
{
4646
return $this->scopeConfig->isSetFlag(self::XML_PATH_NEWSLETTER_ACTIVE, $scopeType);
4747
}

0 commit comments

Comments
 (0)