diff --git a/modules/ppcp-button/src/Assets/class-smartbutton.php b/modules/ppcp-button/src/Assets/class-smartbutton.php index 8c139cf59..8ff8584dc 100644 --- a/modules/ppcp-button/src/Assets/class-smartbutton.php +++ b/modules/ppcp-button/src/Assets/class-smartbutton.php @@ -724,9 +724,8 @@ class SmartButton implements SmartButtonInterface { if ( $payee->merchant_id() ) { $params['merchant-id'] = $payee->merchant_id(); } - $disable_funding = $this->settings->has( 'disable_funding' ) ? + $disable_funding = $this->settings->has( 'disable_funding' ) ? $this->settings->get( 'disable_funding' ) : array(); - $disable_funding[] = 'venmo'; if ( ! is_checkout() ) { $disable_funding[] = 'card'; } @@ -739,7 +738,10 @@ class SmartButton implements SmartButtonInterface { if ( 'GB' === $country ) { $disable_funding[] = 'credit'; } - $params['disable-funding'] = implode( ',', array_unique( $disable_funding ) ); + + if ( count( $disable_funding ) > 0 ) { + $params['disable-funding'] = implode( ',', array_unique( $disable_funding ) ); + } $smart_button_url = add_query_arg( $params, 'https://www.paypal.com/sdk/js' ); return $smart_button_url; diff --git a/modules/ppcp-wc-gateway/services.php b/modules/ppcp-wc-gateway/services.php index 097923492..e7eed18a3 100644 --- a/modules/ppcp-wc-gateway/services.php +++ b/modules/ppcp-wc-gateway/services.php @@ -612,6 +612,7 @@ return array( 'mybank' => _x( 'MyBank', 'Name of payment method', 'woocommerce-paypal-payments' ), 'p24' => _x( 'Przelewy24', 'Name of payment method', 'woocommerce-paypal-payments' ), 'sofort' => _x( 'Sofort', 'Name of payment method', 'woocommerce-paypal-payments' ), + 'venmo' => _x( 'Venmo', 'Name of payment method', 'woocommerce-paypal-payments' ), ), 'screens' => array( State::STATE_PROGRESSIVE,