Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Update WooCommerce Cart

add_action( 'wp_footer', 'bbloomer_cart_refresh_update_qty', 9999 );

function bbloomer_cart_refresh_update_qty() {
     if ( is_cart() || ( is_cart() && is_checkout() ) ) {
          ?>
          <style type="text/css">
            input[name='update_cart'] {
                display: none !important;
            }
             /* OR TRY THIS */
 
	     button[name='update_cart']
            {display: none !important;}
        </style>
        <script type="text/javascript">
	jQuery('div.woocommerce').on('change', 'input.qty', function(){
	     jQuery("[name='update_cart']").removeAttr('disabled').attr('aria-disabled','false').trigger("click");
});
       </script>
	<?php

	}
}
Source by exploretech.dev #
 
PREVIOUS NEXT
Tagged: #Update #WooCommerce #Cart
ADD COMMENT
Topic
Name
9+6 =