mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
render message on checkout only when paypal payment method is selected
This commit is contained in:
parent
05be224b65
commit
51d89a8d4a
2 changed files with 4 additions and 2 deletions
|
@ -51,7 +51,9 @@ const bootstrap = () => {
|
|||
checkoutBootstap.init();
|
||||
}
|
||||
|
||||
messageRenderer.render();
|
||||
if (context !== 'checkout') {
|
||||
messageRenderer.render();
|
||||
}
|
||||
};
|
||||
document.addEventListener(
|
||||
'DOMContentLoaded',
|
||||
|
|
|
@ -45,7 +45,6 @@ class CheckoutBootstap {
|
|||
this.gateway.hosted_fields.wrapper,
|
||||
actionHandler.configuration(),
|
||||
);
|
||||
this.messages.render();
|
||||
}
|
||||
|
||||
switchBetweenPayPalandOrderButton() {
|
||||
|
@ -63,6 +62,7 @@ class CheckoutBootstap {
|
|||
if (currentPaymentMethod === 'ppcp-gateway') {
|
||||
this.renderer.showButtons(this.gateway.button.wrapper);
|
||||
this.renderer.showButtons(this.gateway.messages.wrapper);
|
||||
this.messages.render();
|
||||
this.renderer.hideButtons(this.gateway.hosted_fields.wrapper);
|
||||
}
|
||||
if (currentPaymentMethod === 'ppcp-credit-card-gateway') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue