Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save AnanthFlycart/20c592f84f38fbf22405dd0ff15833b1 to your computer and use it in GitHub Desktop.
Save AnanthFlycart/20c592f84f38fbf22405dd0ff15833b1 to your computer and use it in GitHub Desktop.
Woo discount rules: Refresh the cart after updating cart item
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