Skip to content

Commit b9dc20c

Browse files
committed
MAGETWO-66793: [Backport] Merchant can't unsubscribe Customer from Newsletter in Admin
1 parent 2311795 commit b9dc20c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ protected function _updateCustomerSubscription($customerId, $subscribe)
558558
$isConfirmNeed = 1 === (int)$this->_scopeConfig->getValue(
559559
self::XML_PATH_CONFIRMATION_FLAG,
560560
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
561-
);
561+
);
562562
$status = $this->getSubscriptionStatus($subscribe, $isConfirmNeed, $customerId);
563563
if ($status == self::STATUS_SUBSCRIBED && $customerData->getConfirmation() === null) {
564564
$sendInformationEmail = true;
@@ -627,9 +627,7 @@ private function getSubscriptionStatus($subscribe, $isConfirmNeed, $customerId)
627627
} elseif ($isConfirmNeed) {
628628
$status = self::STATUS_NOT_ACTIVE;
629629
}
630-
} elseif (($this->getStatus() == self::STATUS_UNCONFIRMED)) {
631-
$status = self::STATUS_SUBSCRIBED;
632-
} else {
630+
} elseif (($this->getStatus() != self::STATUS_UNCONFIRMED)) {
633631
$status = self::STATUS_UNSUBSCRIBED;
634632
}
635633

0 commit comments

Comments
 (0)