Remove add venmo to disable funding by default, add it as disable_funding option

This commit is contained in:
dinamiko 2021-03-10 15:02:54 +01:00
parent e2cb8cdb1f
commit f8ac20367b
2 changed files with 6 additions and 3 deletions

View file

@ -726,7 +726,6 @@ class SmartButton implements SmartButtonInterface {
}
$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';
}
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;

View file

@ -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,