Skip to content

Commit

Permalink
Solving the issue of inconsistency of Order state and status field af…
Browse files Browse the repository at this point in the history
…ter OFFER_CLOSE notification is processed (#2727)
  • Loading branch information
khushboo-singhvi authored Sep 16, 2024
1 parent 5511ac0 commit 4d4406a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Helper/Webhook/OfferClosedWebhookHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ public function handleWebhook(MagentoOrder $order, Notification $notification, s
}

// Move the order from PAYMENT_REVIEW to NEW, so that it can be cancelled
if (!$order->canCancel() && $this->configHelper->getNotificationsCanCancel($order->getStoreId())) {
if (!$order->isCanceled()
&& !$order->canCancel()
&& $this->configHelper->getNotificationsCanCancel($order->getStoreId())
) {
$order->setState(MagentoOrder::STATE_NEW);
}

Expand Down

0 comments on commit 4d4406a

Please sign in to comment.