Skip to content

Commit

Permalink
Update for removed payment ID fallback in formatted payment string (p…
Browse files Browse the repository at this point in the history
  • Loading branch information
rvdsteege committed Jul 3, 2023
1 parent d831eb1 commit 952d9eb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ public function start( Payment $payment ) {
// Purchase ID.
$purchase_id = $payment->format_string( (string) $this->config->get_purchase_id() );

if ( '' === $purchase_id ) {
$purchase_id = $payment->get_id();
}

$payment->set_meta( 'purchase_id', $purchase_id );

/**
Expand Down

0 comments on commit 952d9eb

Please sign in to comment.