Merge pull request #2755 from woocommerce/PCP-3826-apple-pay-is-missing-from-on-all-pages-and-button-styling-preview-on-standard-payment-tab-and-advanced-processing-tab

Apple Pay button preview missing in Standard payment and Advanced Processing tabs (3826)
This commit is contained in:
Emili Castells 2024-11-04 16:44:18 +01:00 committed by GitHub
commit 7c14ea9c8c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -407,10 +407,17 @@ class ApplePayButton {
.querySelectorAll( 'style#ppcp-hide-apple-pay' )
.forEach( ( el ) => el.remove() );
const paymentMethodAppleLi = document.querySelector('.wc_payment_method.payment_method_ppcp-applepay' );
if (paymentMethodAppleLi.style.display === 'none' || paymentMethodAppleLi.style.display === '') {
paymentMethodAppleLi.style.display = 'block';
}
const paymentMethodAppleLi = document.querySelector(
'.wc_payment_method.payment_method_ppcp-applepay'
);
if (
paymentMethodAppleLi &&
( paymentMethodAppleLi.style.display === 'none' ||
paymentMethodAppleLi.style.display === '' )
) {
paymentMethodAppleLi.style.display = 'block';
}
this.allElements.forEach( ( element ) => {
element.style.display = '';