Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save AshlinRejo/3f6fbd4bcb0a70912fa4755d71efe0b4 to your computer and use it in GitHub Desktop.
Save AshlinRejo/3f6fbd4bcb0a70912fa4755d71efe0b4 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