Skip to content

Commit

Permalink
Ensure the payment method ID is recorded as the payment method of pay…
Browse files Browse the repository at this point in the history
…ment, not of retrievable type (#2951)
  • Loading branch information
james-allan authored Feb 27, 2024
1 parent bef90eb commit 81a6849
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1517,8 +1517,9 @@ public function set_payment_method_title_for_order( $order, $payment_method_type
}
$payment_method = $this->payment_methods[ $payment_method_type ];
$payment_method_title = $payment_method->get_label();
$payment_method_id = $payment_method instanceof WC_Stripe_UPE_Payment_Method_CC ? $this->id : $payment_method->id;

$order->set_payment_method( $this->get_upe_gateway_id_for_order( $payment_method ) );
$order->set_payment_method( $payment_method_id );
$order->set_payment_method_title( $payment_method_title );
$order->save();
}
Expand Down

0 comments on commit 81a6849

Please sign in to comment.