From b1e38d0bc53d0749fb2085e2311b7072d1558634 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Berm=C3=BAdez?= <41609179+ManuBermudez17@users.noreply.github.com> Date: Mon, 21 Mar 2022 17:35:43 +0100 Subject: [PATCH] =?UTF-8?q?Modificaci=C3=B3n=20para=20que=20funcione=20con?= =?UTF-8?q?=20CheckoutWC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit El plugins se insertaba perfectamente en el CheckoutWC, pero cuando se hacia click en el botón de Finalizar Compra (#place_order), si dejaba los campos de la tarjeta vacíos o si insertabas los datos, no entraba en funcionamiento el evento de paycomet. Realice este cambio y nos funciona perfectamente. He comprobado este cambio y funciona tanto con CheckoutWC como si desactivamos este y utilizados el carrito del theme. --- template/checkout/jetiframe-checkout.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/template/checkout/jetiframe-checkout.php b/template/checkout/jetiframe-checkout.php index c120184..7f9387e 100644 --- a/template/checkout/jetiframe-checkout.php +++ b/template/checkout/jetiframe-checkout.php @@ -141,7 +141,7 @@ function jetIframeValidated(){ // formSubmit jQuery( function( $ ) { - $( "#place_order").on('click',function( event ) { + $(document).on('click','#place_order',function( event ) { if ($( '#payment_method_paytpv' ).is( ':checked' )) { event.preventDefault(); @@ -161,4 +161,4 @@ function jetIframeValidated(){ setTimeout(() => { checkSelectedCard() }, 100); }); - \ No newline at end of file +