Last active
July 10, 2019 06:54
-
-
Save imran-khan1/730ab9e9cf4e8afd4b54b7c7a4a8a435 to your computer and use it in GitHub Desktop.
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
<?php | |
/* | |
update cart on quantity field value change | |
*/ | |
function wc_qty_change_update_cart(){?> | |
<script> | |
jQuery(".qty").blur(function(){ | |
jQuery("[name='update_cart']").trigger("click"); | |
}); | |
</script> | |
<?php | |
} | |
add_action("wp_footer","wc_qty_change_update_cart"); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment