Last active
October 21, 2020 09:05
-
-
Save Balakrishnan-flycart/1d23185ab434eb8e515671c9d7b5666a to your computer and use it in GitHub Desktop.
Woo Discount Rules v2 - Refresh checkout when change payment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_action('woocommerce_review_order_before_payment', function(){ | |
| if (!is_cart()) { | |
| ?> | |
| <script type="text/javascript"> | |
| (function ($) { | |
| $('form.checkout').on('change', '.shipping_method', function () { | |
| $('body').trigger('update_checkout'); | |
| location.reload(); | |
| }); | |
| })(jQuery); | |
| </script> | |
| <?php | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment