Forked from AshlinRejo/Woo discount rules: Refresh the cart after updating cart item
Created
May 30, 2022 13:16
-
-
Save AnanthFlycart/20c592f84f38fbf22405dd0ff15833b1 to your computer and use it in GitHub Desktop.
Woo discount rules: Refresh the cart after updating cart item
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_before_cart', function (){ | |
?> | |
<script type="text/javascript"> | |
jQuery( document.body ).on( 'updated_cart_totals', function() { | |
location.reload(); | |
}); | |
</script> | |
<?php | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment