<?php /** * Display the number of items added to cart */ echo WC()->cart->get_cart_contents_count();