Created
February 5, 2019 09:51
-
-
Save AshlinRejo/3f6fbd4bcb0a70912fa4755d71efe0b4 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