Skip to content

Commit

Permalink
Fix getting order status with payment ID by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
rvdsteege committed Nov 23, 2023
1 parent c430deb commit 772fa93
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/OrderStandard/Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down

0 comments on commit 772fa93

Please sign in to comment.