Skip to content

Commit

Permalink
fix condition to take the action #1866 for 2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzaloebiz committed Feb 22, 2024
1 parent 5f69efd commit 7a88457
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Model/Api/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,8 @@ protected function generatePOSTPayload(
$order->setMailchimpFlag(1);
$this->modifiedOrder = true;
}
} else {
$this->_helper->log();
}

if ($order->getMailchimpLandingPage()) {
Expand Down Expand Up @@ -766,7 +768,7 @@ protected function getCampaign($store, $email)
$activity = $api->lists->members->memberActivity->get($this->_helper->getDefaultList($store), md5($email), null, null, $actions);
if ($activity) {
foreach ($activity['activity'] as $act) {
if (key_exists('action', $act) && ($act['action'] == 'click' || $act['action'] == 'open')&& key_exists('campaign_id', $act) && $act['campaign_id']) {
if (key_exists('action', $act) && key_exists('campaign_id', $act) && $act['campaign_id']) {
$campaign_id = $act['campaign_id'];
break;
}
Expand Down

0 comments on commit 7a88457

Please sign in to comment.