WordPress at Your Fingertips
function is not described

WC_Cart::is_empty() public WC 1.0

Checks if the cart is empty.

{} It's a method of the class: WC_Cart{}

No Hooks.

Return

true|false.

Usage

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

Code of WC_Cart::is_empty() WC 5.7.0

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