From 28fda13e931dd31a75b99fdf7219874ea1356b36 Mon Sep 17 00:00:00 2001 From: Robby Date: Wed, 17 Jun 2026 18:06:03 +0700 Subject: [PATCH] fix: restore WC order_id for BI-SNAP & DANA payment notifications --- class/class.midtrans-gateway-notif-handler.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/class/class.midtrans-gateway-notif-handler.php b/class/class.midtrans-gateway-notif-handler.php index 818d3b0..963b14f 100644 --- a/class/class.midtrans-gateway-notif-handler.php +++ b/class/class.midtrans-gateway-notif-handler.php @@ -129,6 +129,8 @@ public function handleMidtransNotificationRequest() { } // Verify Midtrans notification $midtrans_notification = WC_Midtrans_API::getStatusFromMidtransNotif( $plugin_id ); + // BI-SNAP & DANA payment methods return transaction_id in order_id field, restore the WooCommerce order_id back from the raw notification body + $midtrans_notification->getResponse()->order_id = $raw_notification['order_id']; // If notification verified, handle it if (in_array($midtrans_notification->status_code, array(200, 201, 202, 407))) { // @TAG: order-id-suffix-handling