Skip to main content

Posts

Showing posts with the label how to update cart without clicking update cart button in woocommerce

How to auto update woocommerce cart when quantity is changed?

Solution:  It is very easy to update your woocommerce cart page automatically when quantity is changed. To do this open your functions.php file and write down the following code. add_action ( ' woocommerce_after_cart ', ' mycart_auto_update ' ); function  mycart_auto_update () {     echo '<script>     jQuery(document).ready(function($)     {           $(".woocommerce-cart-form").find(".qty").on("change", function()               {                     upd_cart_btn.trigger("click");              });     });     </script>';  }