WordPress at Your Fingertips
function is not described

WC_Cart::check_cart_items() public WC 1.0

Check all cart items for errors.

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

No Hooks.

Return

null. Nothing.

Usage

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

Code of WC_Cart::check_cart_items() WC 5.6.0

public function check_cart_items() {
	$return = true;
	$result = $this->check_cart_item_validity();

	if ( is_wp_error( $result ) ) {
		wc_add_notice( $result->get_error_message(), 'error' );
		$return = false;
	}

	$result = $this->check_cart_item_stock();

	if ( is_wp_error( $result ) ) {
		wc_add_notice( $result->get_error_message(), 'error' );
		$return = false;
	}

	return $return;

}