mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 09:08:09 +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() ) {
|
||||
$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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue