Skip to content

Commit

Permalink
Merge pull request #750 from mailchimp/Issue696-2.2
Browse files Browse the repository at this point in the history
closes #696 for magento 2.2
  • Loading branch information
gonzaloebiz authored Jun 4, 2019
2 parents 2f38a8d + e596539 commit 68aa080
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 @@ -106,9 +106,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 68aa080

Please sign in to comment.