In my woocommerce based store I have combined cart and checkout pages into one, it works well, but there is an issue when I try to remove a coupon. Coupon removes from cart with AJAX processing, so when removal is complete - the page doesn't reload, and coupon still displaying like applied (but actually it's removed). So I need to disable AJAX for applying/removing coupon function.
I tried to add this code into my theme's functions.php:
function disable_checkout_script(){
wp_dequeue_script( 'wc-checkout' );
}
add_action( 'wp_enqueue_scripts', 'disable_checkout_script' );
It solves my problem, but this code disables ALL AJAX at the checkout page, and I would like to disable ajax only for apply/remove coupon, and to save another ajax processing like verification for billing/shipping fields.
Please help, unfortunately I'm not a JS expert. Regards!