Skip to content

Commit

Permalink
Merge pull request #751 from mailchimp/Issue696-2.3
Browse files Browse the repository at this point in the history
closes #696 for magento 2.3
  • Loading branch information
gonzaloebiz authored Jun 4, 2019
2 parents f3c6097 + ec62764 commit b382783
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Model/Plugin/Subscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,7 @@ public function beforeSubscribeCustomerById(
$email = $customer->getEmail();
$mergeVars = $this->_helper->getMergeVarsBySubscriber($subscriber, $email);
$api = $this->_helper->getApi($storeId);
$isSubscribeOwnEmail = $this->_customerSession->isLoggedIn()
&& $this->_customerSession->getCustomerDataObject()->getEmail() == $subscriber->getSubscriberEmail();
if ($this->_helper->isDoubleOptInEnabled($storeId) && !$isSubscribeOwnEmail) {
if ($this->_helper->isDoubleOptInEnabled($storeId)) {
$status = 'pending';
} else {
$status = 'subscribed';
Expand Down

0 comments on commit b382783

Please sign in to comment.