diff --git a/modules/ppcp-button/resources/js/modules/Renderer/PaymentButton.js b/modules/ppcp-button/resources/js/modules/Renderer/PaymentButton.js index 6ffc24249..349f1e069 100644 --- a/modules/ppcp-button/resources/js/modules/Renderer/PaymentButton.js +++ b/modules/ppcp-button/resources/js/modules/Renderer/PaymentButton.js @@ -175,9 +175,9 @@ export default class PaymentButton { /** * Whether the current browser/website support the payment method. * - * @type {boolean} + * @type {?boolean} */ - #isEligible = false; + #isEligible = null; /** * Whether this button is visible. Modified by `show()` and `hide()` @@ -889,6 +889,10 @@ export default class PaymentButton { if ( ! this.isPresent ) { return; } + if ( ! this.isEligible ) { + this.wrapperElement.style.display = 'none'; + return; + } this.applyWrapperStyles();