woocommerce / woocommerce-paypal-payments

https://wordpress.org/plugins/woocommerce-paypal-payments/
GNU General Public License v2.0
62 stars 48 forks source link

Hide payment button wrapper for ineligible buttons (3861) #2779

Closed stracker-phil closed 2 weeks ago

stracker-phil commented 2 weeks ago

Description

This PR hides the entire payment button wrapper from the DOM for ineligible payment buttons.

It affects ApplePay and GooglePay, by removing the empty "placeholder" div when one of those buttons is not eligible.

The default value of #isEligible is set to null to trigger a button refresh() when the initial isEligible flag is set (before this PR, the refresh() was only triggered when a button became eligible, but not when it stayed ineligible)