Skip to content

Commit 9d667c6

Browse files
committed
ADO-313: adds comment
1 parent 7437708 commit 9d667c6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/code/Meta/Conversion/Observer/Tracker/Purchase.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ public function __construct(
2424

2525
public function execute(Observer $observer): void
2626
{
27+
// Purchase event is triggered twice sometimes, to prevent that check if event id is already stored for current request
28+
// if it does prevent the message form being added to the message queue.
2729
if (!$this->capiEventIdHandler->getMetaEventId(self::EVENT_NAME)) {
2830
$lastOrderId = $this->checkoutSession->getLastRealOrder()->getEntityId();
2931
$payload = $this->purchaseTracker->getPayload(['lastOrder' => $lastOrderId]);

0 commit comments

Comments
 (0)