From 772fa9321a01cceb4748842ad4a5a212aea4950c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reu=CC=88el=20van=20der=20Steege?= Date: Thu, 23 Nov 2023 14:20:52 +0100 Subject: [PATCH] Fix getting order status with payment ID by default. --- src/OrderStandard/Gateway.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/OrderStandard/Gateway.php b/src/OrderStandard/Gateway.php index cdf2634..1dd903e 100644 --- a/src/OrderStandard/Gateway.php +++ b/src/OrderStandard/Gateway.php @@ -334,6 +334,10 @@ public function update_status( Payment $payment ) { // Get order status with direct query. $order_id = $payment->format_string( $this->config->order_id ); + if ( '' === $order_id ) { + $order_id = $payment->get_id(); + } + try { $status = $this->client->get_order_status( $order_id ); } catch ( \Exception $e ) {