From 4a74911f6d5729c06b8b8f9b7a8a0259d38a5f93 Mon Sep 17 00:00:00 2001 From: Alex P Date: Tue, 4 Jul 2023 16:43:37 +0300 Subject: [PATCH] Fix funding source check --- modules/ppcp-button/src/Endpoint/CreateOrderEndpoint.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ppcp-button/src/Endpoint/CreateOrderEndpoint.php b/modules/ppcp-button/src/Endpoint/CreateOrderEndpoint.php index 9ac7aea26..686b87dd8 100644 --- a/modules/ppcp-button/src/Endpoint/CreateOrderEndpoint.php +++ b/modules/ppcp-button/src/Endpoint/CreateOrderEndpoint.php @@ -298,7 +298,7 @@ class CreateOrderEndpoint implements EndpointInterface { } if ( 'checkout' === $data['context'] ) { - if ( ! in_array( $funding_source, $this->funding_sources_without_redirect, true ) ) { + if ( $payment_method === PayPalGateway::ID && ! in_array( $funding_source, $this->funding_sources_without_redirect, true ) ) { $this->session_handler->replace_order( $order ); $this->session_handler->replace_funding_source( $funding_source ); }