Automatic cart update on click
Video
CSS Snippet: Hide the WooCommerce “Update Cart” Button
.woocommerce button[name="update_cart"],
.woocommerce input[name="update_cart"] {
display: none;
}
.coupon.under-proceed {
margin-bottom: 1em;
}
.coupon.under-proceed button {
margin-top: 1em;
background: #efeff0;
}
PHP Snippet: Auto-update WooCommerce Cart when Quantity Changes
//Automatic cart update on click //
add_action( 'wp_footer', 'cart_update_qty_script' );
function cart_update_qty_script() {
if (is_cart()) :
?>
<script>
jQuery('div.woocommerce').on('change', '.qty', function(){
jQuery("[name='update_cart']").removeAttr('disabled');
jQuery("[name='update_cart']").trigger("click");
});
</script>
<?php
endif;
}