Remove disabling Update Cart button on WooCommerce cart page

/*
 * This will make Update Cart button always enabled, even if no changes were made in cart.
 */
function remove_disabling_update_cart_button_on_cart() {
	if ( is_cart() ) {
		echo "<script type='text/javascript'>
			jQuery(document).ready(function() {
				jQuery( '.shop_table.cart' ).closest( 'form' ).find( 'input[name=\"update_cart\"]' ).removeProp( 'disabled' );
			});
		</script>";
	}
}
// Add script to footer
add_action( 'wp_footer', 'remove_disabling_update_cart_button_on_cart', PHP_INT_MAX );

You can add this snippet to your (child) theme's functions.php file.

No comments yet.

Leave a Reply