Skip to content

Commit

Permalink
Merged PR 56612: Add missing setType call to OrderSaveAfter
Browse files Browse the repository at this point in the history
## What's being changed

OrderSaveAfter.

## Why it's being changed

We fixed the incorrect queue topic name already, but in fact we also needed to `setType`, otherwise the SubscriptionData class will throw a type error on `getType`.

## How to review / test this change

- Subscribe an email address
- Check out as a guest with this same email address
- See the order complete
- Go into orders admin, cancel the order
- See the order cancelled

Related work items: #264582
  • Loading branch information
sta1r committed Jul 29, 2024
1 parent a26a4f8 commit 403544e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Observer/Sales/OrderSaveAfter.php
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ private function resetContact($contact)
$subscriptionData->setId($contact->getId());
$subscriptionData->setEmail($contact->getEmail());
$subscriptionData->setWebsiteId($contact->getWebsiteId());
$subscriptionData->setType('subscribe');
$this->publisher->publish('ddg.newsletter.subscription', $subscriptionData);
}
}
Expand Down

0 comments on commit 403544e

Please sign in to comment.