mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-31 06:52:50 +08:00
⚡️ Only init smart buttons when they are activated
This commit is contained in:
parent
3200b05e48
commit
c18bf945ef
1 changed files with 8 additions and 6 deletions
|
@ -56,12 +56,14 @@ class Renderer {
|
|||
Object.keys( enabledSeparateGateways ).length !== 0;
|
||||
|
||||
if ( ! hasEnabledSeparateGateways ) {
|
||||
this.renderButtons(
|
||||
settings.button.wrapper,
|
||||
settings.button.style,
|
||||
contextConfig,
|
||||
hasEnabledSeparateGateways
|
||||
);
|
||||
if ( this.useSmartButtons ) {
|
||||
this.renderButtons(
|
||||
settings.button.wrapper,
|
||||
settings.button.style,
|
||||
contextConfig,
|
||||
hasEnabledSeparateGateways
|
||||
);
|
||||
}
|
||||
} else {
|
||||
// render each button separately
|
||||
for ( const fundingSource of paypal
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue