order review checkout page reset woocomerce code example
Example: order review checkout page reset woocomerce
function refresh_checkout_on_payment_methods_change(){
?>
<script type="text/javascript">
(function($){
$( 'form.checkout' ).on( 'change', 'input[name^="shipping_method"]', function() {
$('body').trigger('update_checkout');
});
})(jQuery);
</script>
<?php
}
add_action( 'woocommerce_review_order_before_payment', 'refresh_checkout_on_payment_methods_change' );