Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

my-account-credit-card.js trigger errado #82

Open
gopaulo opened this issue Apr 21, 2023 · 0 comments
Open

my-account-credit-card.js trigger errado #82

gopaulo opened this issue Apr 21, 2023 · 0 comments

Comments

@gopaulo
Copy link

gopaulo commented Apr 21, 2023

O trigger da linha 6 > $('#place_order').on('click', function(e) deveria ter um check para validar se existem outros métodos de pagamento.

Quando existem outros gateways de pagamento presente o my-account/add-payment-method do Woocommerce nao funciona caso vc tente adicionar um método de pagamento de outro gateway.

A linha alert("Erro salvando cartão"); sempre é disparada.

É necessário adicionar um check (if)


 $('#place_order').on('click', function(e) {
            if($('#payment_method_iugu-credit-card').is(':checked')) {
                e.preventDefault();
                 [...]

Isso evitaria o erro e possibilitaria compatibilidade com outros plugins de gateway de pagamentos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant