🐛 Hide payment button wrapper when not eligible

This commit is contained in:
Philipp Stracker 2024-11-08 14:39:06 +01:00
parent 40fda872bb
commit e97e464fd8
No known key found for this signature in database

View file

@ -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();