From e2e28977140ea2d1088800a0c7c902c1fb77d9f9 Mon Sep 17 00:00:00 2001 From: Alex P Date: Thu, 27 Apr 2023 15:45:39 +0300 Subject: [PATCH] Allow only paylater, venmo apm in express block --- modules/ppcp-button/src/Assets/SmartButton.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/ppcp-button/src/Assets/SmartButton.php b/modules/ppcp-button/src/Assets/SmartButton.php index 3ea10a1bb..6dfaf79f7 100644 --- a/modules/ppcp-button/src/Assets/SmartButton.php +++ b/modules/ppcp-button/src/Assets/SmartButton.php @@ -1014,7 +1014,10 @@ class SmartButton implements SmartButtonInterface { } if ( in_array( $context, array( 'checkout-block', 'cart-block' ), true ) ) { - $disable_funding[] = 'card'; + $disable_funding = array_diff( + array_keys( $this->all_funding_sources ), + array( 'venmo', 'paylater' ) + ); } if ( $this->is_free_trial_cart() ) {