WC_Cart::get_cart_contents_count()
Get number of items in the cart.
Description Description
Return Return
(int)
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' ) ) ); }