mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Simplify message wrapper rendering and add shop, home locations
This commit is contained in:
parent
0062f20c7a
commit
7da5d8d68a
6 changed files with 328 additions and 45 deletions
|
@ -156,8 +156,15 @@ class CheckoutBootstap {
|
|||
}
|
||||
|
||||
shouldShowMessages() {
|
||||
return getCurrentPaymentMethod() === PaymentMethods.PAYPAL
|
||||
&& !PayPalCommerceGateway.is_free_trial_cart;
|
||||
// hide when another method selected only if messages are near buttons
|
||||
const messagesWrapper = document.querySelector(this.gateway.messages.wrapper);
|
||||
if (getCurrentPaymentMethod() !== PaymentMethods.PAYPAL &&
|
||||
messagesWrapper && jQuery(messagesWrapper).closest('.ppc-button-wrapper').length
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return !PayPalCommerceGateway.is_free_trial_cart;
|
||||
}
|
||||
|
||||
disableCreditCardFields() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue