Skip to content

Commit fc46215

Browse files
author
Peter Halassek
committed
added partial fix for issue #2617. This way double opt in works and the id set before the confirmation mal is sent out.
1 parent 1bda4bf commit fc46215

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,14 +442,14 @@ public function subscribe($email)
442442
$this->setStatusChanged(true);
443443

444444
try {
445+
$this->save();
445446
if ($isConfirmNeed === true
446447
&& $isOwnSubscribes === false
447448
) {
448449
$this->sendConfirmationRequestEmail();
449450
} else {
450451
$this->sendConfirmationSuccessEmail();
451452
}
452-
$this->save();
453453
return $this->getStatus();
454454
} catch (\Exception $e) {
455455
throw new \Exception($e->getMessage());

0 commit comments

Comments
 (0)