Skip to content

Commit

Permalink
Closes #365 for Magento 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzaloebiz committed Dec 10, 2018
1 parent 0c42290 commit 708068a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Controller/Checkout/Success.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ public function execute()
try {
$subscriber->loadByEmail($order->getCustomerEmail());
if ($subscriber->getEmail()==$order->getCustomerEmail()) {
if($subscriber->getStatus()==\Magento\Newsletter\Model\Subscriber::STATUS_UNSUBSCRIBED) {
$subscriber->subscribe($subscriber->getEmail());
}
$interestGroup->getBySubscriberIdStoreId($subscriber->getSubscriberId(), $subscriber->getStoreId());
$interestGroup->setGroupdata($this->_helper->serialize($params));
$interestGroup->setSubscriberId($subscriber->getSubscriberId());
Expand Down

0 comments on commit 708068a

Please sign in to comment.