Skip to content

Commit

Permalink
Add return_url for deferred UPE only
Browse files Browse the repository at this point in the history
  • Loading branch information
Timur Karimov committed Apr 18, 2023
1 parent 9a92f25 commit 1cafab7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/class-wc-payment-gateway-wcpay.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 1cafab7

Please sign in to comment.