mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 10:55:00 +08:00
Remove add venmo to disable funding by default, add it as disable_funding
option
This commit is contained in:
parent
e2cb8cdb1f
commit
f8ac20367b
2 changed files with 6 additions and 3 deletions
|
@ -724,9 +724,8 @@ class SmartButton implements SmartButtonInterface {
|
||||||
if ( $payee->merchant_id() ) {
|
if ( $payee->merchant_id() ) {
|
||||||
$params['merchant-id'] = $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();
|
$this->settings->get( 'disable_funding' ) : array();
|
||||||
$disable_funding[] = 'venmo';
|
|
||||||
if ( ! is_checkout() ) {
|
if ( ! is_checkout() ) {
|
||||||
$disable_funding[] = 'card';
|
$disable_funding[] = 'card';
|
||||||
}
|
}
|
||||||
|
@ -739,7 +738,10 @@ class SmartButton implements SmartButtonInterface {
|
||||||
if ( 'GB' === $country ) {
|
if ( 'GB' === $country ) {
|
||||||
$disable_funding[] = 'credit';
|
$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' );
|
$smart_button_url = add_query_arg( $params, 'https://www.paypal.com/sdk/js' );
|
||||||
return $smart_button_url;
|
return $smart_button_url;
|
||||||
|
|
|
@ -612,6 +612,7 @@ return array(
|
||||||
'mybank' => _x( 'MyBank', 'Name of payment method', 'woocommerce-paypal-payments' ),
|
'mybank' => _x( 'MyBank', 'Name of payment method', 'woocommerce-paypal-payments' ),
|
||||||
'p24' => _x( 'Przelewy24', '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' ),
|
'sofort' => _x( 'Sofort', 'Name of payment method', 'woocommerce-paypal-payments' ),
|
||||||
|
'venmo' => _x( 'Venmo', 'Name of payment method', 'woocommerce-paypal-payments' ),
|
||||||
),
|
),
|
||||||
'screens' => array(
|
'screens' => array(
|
||||||
State::STATE_PROGRESSIVE,
|
State::STATE_PROGRESSIVE,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue