Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix - Customer emails are not being sent from admin if customer is from store "0" #26293

Merged
merged 6 commits into from
Apr 18, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions app/code/Magento/Customer/Model/EmailNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public function credentialsChanged(
private function emailAndPasswordChanged(CustomerInterface $customer, $email)
{
$storeId = $customer->getStoreId();
if (!$storeId) {
if ($storeId === null) {
$storeId = $this->getWebsiteStoreId($customer);
}

Expand All @@ -193,7 +193,7 @@ private function emailAndPasswordChanged(CustomerInterface $customer, $email)
private function emailChanged(CustomerInterface $customer, $email)
{
$storeId = $customer->getStoreId();
if (!$storeId) {
if ($storeId === null) {
$storeId = $this->getWebsiteStoreId($customer);
}

Expand All @@ -218,7 +218,7 @@ private function emailChanged(CustomerInterface $customer, $email)
private function passwordReset(CustomerInterface $customer)
{
$storeId = $customer->getStoreId();
if (!$storeId) {
if ($storeId === null) {
$storeId = $this->getWebsiteStoreId($customer);
}

Expand Down Expand Up @@ -317,7 +317,7 @@ private function getWebsiteStoreId($customer, $defaultStoreId = null)
public function passwordReminder(CustomerInterface $customer)
{
$storeId = $customer->getStoreId();
if (!$storeId) {
if ($storeId === null) {
$storeId = $this->getWebsiteStoreId($customer);
}

Expand All @@ -341,7 +341,7 @@ public function passwordReminder(CustomerInterface $customer)
public function passwordResetConfirmation(CustomerInterface $customer)
{
$storeId = $customer->getStoreId();
if (!$storeId) {
if ($storeId === null) {
$storeId = $this->getWebsiteStoreId($customer);
}

Expand Down Expand Up @@ -382,7 +382,7 @@ public function newAccount(
);
}

if (!$storeId) {
if ($storeId === null) {
$storeId = $this->getWebsiteStoreId($customer, $sendemailStoreId);
}

Expand Down