Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
annemirasol committed Jan 24, 2025
1 parent 574c853 commit c8a6961
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions includes/payment-methods/class-wc-stripe-upe-payment-gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -2153,8 +2153,8 @@ protected function prepare_payment_information_from_request( WC_Order $order ) {
$payment_information['payment_type'] = 'single'; // single | recurring.
$payment_information['save_payment_method_to_store'] = $save_payment_method_to_store;
$payment_information['payment_method_options'] = $this->get_payment_method_options(
$order,
$selected_payment_type,
$order,
$payment_method_details
);
} else {
Expand All @@ -2173,7 +2173,14 @@ protected function prepare_payment_information_from_request( WC_Order $order ) {
return $payment_information;
}

private function get_payment_method_options( $order, $selected_payment_type, $payment_method_details ) {
/**
* Returns the payment method options for the selected payment type.
*
* @param string $selected_payment_type The selected payment type, e.g. 'klarna'
* @param WC_Order $order The WC Order we are processing a payment for.
* @param stdClass $payment_method_details The payment method details.
*/
private function get_payment_method_options( $selected_payment_type, $order, $payment_method_details ) {
$payment_method_options = [];

// Specify the client in payment_method_options (currently, Checkout only supports a client value of "web")
Expand Down

0 comments on commit c8a6961

Please sign in to comment.