WC_Cart::get_cart_contents_count()

Get number of items in the cart.


Description Description


Return Return

(int)


Top ↑

Source Source

File: includes/class-wc-cart.php

	public function get_cart_contents_count() {
		return apply_filters( 'woocommerce_cart_contents_count', array_sum( wp_list_pluck( $this->get_cart(), 'quantity' ) ) );
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.