Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Balakrishnan-flycart/f74212668f54584cc67b1f9ae511fd52 to your computer and use it in GitHub Desktop.
Save Balakrishnan-flycart/f74212668f54584cc67b1f9ae511fd52 to your computer and use it in GitHub Desktop.
Woo Discount Rules v2 - Refresh the cart summary
add_action('woocommerce_before_cart', function (){
?>
<script type="text/javascript">
jQuery( document ).ready(function() {
jQuery( window ).load(function() {
jQuery("[name='update_cart']").removeAttr('disabled');
jQuery("[name='update_cart']").trigger("click");
});
});
</script>
<?php
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment