Posted by dpratt March 8, 2023Coding Tricks and Tips, Technology, Web development 0 Html Code (place here it needed) " title="" class="mini_cart dropdown_link" data-no-instant> cart->get_cart_contents_count() ), WC()->cart-> get_cart_contents_count() ); ?> - cart->get_cart_total(); ?> Place in your functions.php file or custom function file, this ajax function auto updates cart Icon count and total when Add to cart button is pushed add_filter( 'woocommerce_add_to_cart_fragments', 'header_add_to_cart_fragment', 30, 1 ); function header_add_to_cart_fragment( $fragments ) { global $woocommerce; ob_start(); ?> " title="" class="mini_cart dropdown_link" data-no-instant> cart->cart_contents_count, 'dpthemes'), $woocommerce->cart->cart_contents_count);?> - cart->get_cart_total(); ?> Share: