mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Add query parameter enable-funding=venmo
to all button loads except when Vault is turned on
This commit is contained in:
parent
064fab6e64
commit
3281c61394
1 changed files with 4 additions and 0 deletions
|
@ -754,6 +754,10 @@ class SmartButton implements SmartButtonInterface {
|
|||
$params['disable-funding'] = implode( ',', array_unique( $disable_funding ) );
|
||||
}
|
||||
|
||||
if ( ! $this->settings->has( 'vault_enabled' ) || ! $this->settings->get( 'vault_enabled' ) ) {
|
||||
$params['enable-funding'] = 'venmo';
|
||||
}
|
||||
|
||||
$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