Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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' );
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #order #review #checkout #page #reset #woocomerce
ADD COMMENT
Topic
Name
3+7 =