Fix funding source check

This commit is contained in:
Alex P 2023-07-04 16:43:37 +03:00
parent 298a72b6c5
commit 4a74911f6d
No known key found for this signature in database
GPG key ID: 54487A734A204D71

View file

@ -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 );
}