Página de check -out de revisão de pedido redefinir 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' );
Elated Elk