Skip to content

Commit

Permalink
closes #1311 fix when subscriber is not customer calls magento 2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzaloebiz committed Jul 27, 2023
1 parent 0cfe674 commit 67c234b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Observer/Subscriber/SaveAfter.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function execute(\Magento\Framework\Event\Observer $observer)
if ($isCustomer) {
$subscriberOld = $factory->loadBySubscriberEmail($subscriber->getCustomerId(), $subscriber->getStoreId());
}
if ($this->_helper->isMailChimpEnabled($subscriberOld->getStoreId())&&$isCustomer&&
if ($this->_helper->isMailChimpEnabled($subscriber->getStoreId())&&$isCustomer&&
$subscriberOld->getEmail()&&$subscriber->getEmail()!=$subscriberOld->getEmail()) {
$api = $this->_helper->getApi($subscriberOld->getStoreId());
$mergeVars = $this->_helper->getMergeVarsBySubscriber($subscriberOld, $subscriberOld->getEmail());
Expand Down

0 comments on commit 67c234b

Please sign in to comment.