Skip to content

Commit

Permalink
Fixed the resending Newsletter confirmation issue
Browse files Browse the repository at this point in the history
  • Loading branch information
konarshankar07 committed Aug 13, 2020
1 parent a360c06 commit 1a7c8cd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/code/Magento/Newsletter/Model/SubscriptionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ private function saveSubscriber(
&& (int)$subscriber->getCustomerId() === (int)$customer->getId()
&& (int)$subscriber->getStoreId() === $storeId
&& !$emailChanged
&& $status !== Subscriber::STATUS_NOT_ACTIVE
) {
return false;
}
Expand All @@ -220,10 +221,10 @@ private function saveSubscriber(

/**
* If the subscriber is waiting to confirm from the customer
* and customer changed the email
* or customer changed the email
* than need to send confirmation letter to the new email
*/
return $status === Subscriber::STATUS_NOT_ACTIVE && $emailChanged;
return $status === Subscriber::STATUS_NOT_ACTIVE || $emailChanged;
}

/**
Expand Down

0 comments on commit 1a7c8cd

Please sign in to comment.