mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
disable inline-card when not in checkout
This commit is contained in:
parent
4844ec4706
commit
56a76ac720
1 changed files with 3 additions and 0 deletions
|
@ -411,6 +411,9 @@ class SmartButton implements SmartButtonInterface
|
|||
$disableFunding = $this->settings->has('disable_funding') ?
|
||||
$this->settings->get('disable_funding') : [];
|
||||
$disableFunding[] = 'venmo';
|
||||
if (! is_checkout()) {
|
||||
$disableFunding[] = 'card';
|
||||
}
|
||||
$params['disable-funding'] = implode(',', $disableFunding);
|
||||
$smartButtonUrl = add_query_arg($params, 'https://www.paypal.com/sdk/js');
|
||||
return $smartButtonUrl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue