From 1cafab750ad191d9fa4ab8c353297e4c4f233467 Mon Sep 17 00:00:00 2001 From: Timur Karimov Date: Tue, 18 Apr 2023 18:05:02 +0200 Subject: [PATCH] Add return_url for deferred UPE only --- includes/class-wc-payment-gateway-wcpay.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-wc-payment-gateway-wcpay.php b/includes/class-wc-payment-gateway-wcpay.php index 5a120f3699e..cd74db21c0f 100644 --- a/includes/class-wc-payment-gateway-wcpay.php +++ b/includes/class-wc-payment-gateway-wcpay.php @@ -1118,7 +1118,7 @@ public function process_payment_for_order( $cart, $payment_information, $schedul $request->set_payment_methods( $payment_methods ); $request->set_cvc_confirmation( $payment_information->get_cvc_confirmation() ); - if ( 1 === count( $payment_methods ) && 'card' !== $payment_methods[0] ) { + if ( WC_Payments_Features::is_upe_deferred_intent_enabled() ) { $request->set_return_url( wp_sanitize_redirect( esc_url_raw(