WC_Cart::is_empty()publicWC 1.0

Checks if the cart is empty.

Method of the class: WC_Cart{}

No Hooks.

Return

true|false.

Usage

$WC_Cart = new WC_Cart();
$WC_Cart->is_empty();

WC_Cart::is_empty() code WC 8.6.1

public function is_empty() {
	return 0 === count( $this->get_cart() );
}