Display error message when order is not created, do not handle place order button display when acdc is not enabled

This commit is contained in:
dinamiko 2021-04-20 14:27:37 +02:00
parent 61aa53c188
commit 7f553087c6
2 changed files with 11 additions and 1 deletions

View file

@ -89,6 +89,12 @@ class CheckoutBootstap {
}
displayPlaceOrderButtonForSavedCreditCards() {
const currentPaymentMethod = jQuery(
'input[name="payment_method"]:checked').val();
if (currentPaymentMethod !== 'ppcp-credit-card-gateway') {
return;
}
if (jQuery('#saved-credit-card').length && jQuery('#saved-credit-card').val() !== '') {
this.renderer.hideButtons(this.gateway.button.wrapper)
this.renderer.hideButtons(this.gateway.messages.wrapper)