️ Only init smart buttons when they are activated

This commit is contained in:
Philipp Stracker 2024-11-28 13:34:59 +01:00
parent 3200b05e48
commit c18bf945ef
No known key found for this signature in database

View file

@ -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