Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amazon Pay ECE: fix payment method issues for subscriptions #4008

Merged
merged 12 commits into from
Mar 24, 2025
Prev Previous commit
Next Next commit
Set correct payment type when using Amazon Pay payment token
annemirasol committed Mar 19, 2025
commit d2ef86395300ad1355be5b916a900efd22c4a4f5
Original file line number Diff line number Diff line change
@@ -2213,6 +2213,8 @@ protected function prepare_payment_information_from_request( WC_Order $order ) {

if ( is_a( $token, 'WC_Payment_Token_SEPA' ) ) {
$selected_payment_type = WC_Stripe_UPE_Payment_Method_Sepa::STRIPE_ID;
} elseif ( is_a( $token, 'WC_Payment_Token_Amazon_Pay' ) ) {
$selected_payment_type = WC_Stripe_UPE_Payment_Method_Amazon_Pay::STRIPE_ID;
}
} else {
$payment_method_id = sanitize_text_field( wp_unslash( $_POST['wc-stripe-payment-method'] ?? '' ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing