April 20, 2024 at 3:38 pm
#1440424
Hey profumopuntoit,
Unfortunately I’m not able to test or support your paid plugin, but in my past experience the ajax reload on the cart page is fired by the woocommerce plugin.
I found this snippet that seems to force a ajax reload when the payment type is changed on my demo site, perhaps it will also work or your site too.
Try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:
add_action( 'woocommerce_review_order_before_payment', 'ajax_refresh_payment_method' );
function ajax_refresh_payment_method(){
?>
<script>
(function($){
$( 'form.checkout' ).on( 'change', 'input[name^="payment_method"]', function() {
$('body').trigger('update_checkout');
});
})(jQuery);
</script>
<?php
}
Best regards,
Mike