Display number of items in cart together with total – WooCommerce

Just place this code in your child theme, usually it is the header.php file.

<?php
	
/*
Display number of items in cart and total
*/
	
global $woocommerce;

echo "Items in cart: ".sprintf(_n('%d item', '%d items', $woocommerce->cart->cart_contents_count, 'woothemes'), $woocommerce->cart->cart_contents_count);
echo "<br />";
echo "Total: ".$woocommerce->cart->get_cart_total();
	
?>

Comments are closed.

dapperjanelle@mailxu.com