Skip to content

Commit 1a7c8cd

Browse files
Fixed the resending Newsletter confirmation issue
1 parent a360c06 commit 1a7c8cd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ private function saveSubscriber(
200200
&& (int)$subscriber->getCustomerId() === (int)$customer->getId()
201201
&& (int)$subscriber->getStoreId() === $storeId
202202
&& !$emailChanged
203+
&& $status !== Subscriber::STATUS_NOT_ACTIVE
203204
) {
204205
return false;
205206
}
@@ -220,10 +221,10 @@ private function saveSubscriber(
220221

221222
/**
222223
* If the subscriber is waiting to confirm from the customer
223-
* and customer changed the email
224+
* or customer changed the email
224225
* than need to send confirmation letter to the new email
225226
*/
226-
return $status === Subscriber::STATUS_NOT_ACTIVE && $emailChanged;
227+
return $status === Subscriber::STATUS_NOT_ACTIVE || $emailChanged;
227228
}
228229

229230
/**

0 commit comments

Comments
 (0)