Closed
Description
When disabling the newsletter for store scope and website scope the newsletter checkbox is still visible in register form and the newsletter info-box is visible in customer account dashboard.
The newsletter enabled setting is always retrieved from the default scope
Preconditions (*)
- Magento Version: 2.3.5-p2
Steps to reproduce (*)
- Enable the newsletter for default scope in Stores > Settings > Configuration -> Customers -> Newsletter > General Options > Enabled
- Disable newsletter for store scope.
- Navigate to customer registration page
Expected result (*)
- the newsletter should be disabled in frontend. The newsletter subscription checkbox should not be visible in register form and the newsletter info-box should not be visible in customer account dashboard
Actual result (*)
- The newsletter subscription checkbox is visible in register form and the newsletter info-box is visible in customer account dashboard
\Magento\Newsletter\Model\Config::isActive
/**
* Returns newsletter's enabled status
*
* @param string $scopeType
* @return bool
*/
public function isActive(string $scopeType = ScopeConfigInterface::SCOPE_TYPE_DEFAULT): bool
{
return $this->scopeConfig->isSetFlag(self::XML_PATH_NEWSLETTER_ACTIVE, $scopeType);
}
\Magento\Customer\Block\Form\Register::isNewsletterEnabled
/**
* Newsletter module availability
*
* @return bool
*/
public function isNewsletterEnabled()
{
return $this->_moduleManager->isOutputEnabled('Magento_Newsletter')
&& $this->newsLetterConfig->isActive();
}
Metadata
Metadata
Assignees
Labels
Gate 2 Passed. Manual verification of the issue description passedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedA defect with this priority could have functionality issues which are not to expectations.The issue has been reproduced on latest 2.4-develop branchAffects non-critical data or functionality and does not force users to employ a workaround.
Type
Projects
Status
Done