Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sarancartrabbit/5e7592b0dd44c22ef619ff6bf406bd03 to your computer and use it in GitHub Desktop.
Save sarancartrabbit/5e7592b0dd44c22ef619ff6bf406bd03 to your computer and use it in GitHub Desktop.
Woo Discount v2:To Refresh Add to cart button
add_action('wp_footer', function () {
?>
<script>
jQuery(function($) {
$(document).on("click", ".ajax_add_to_cart", function() {
location.reload();
});
});
</script>
<?php
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment