WC_Cart::check_cart_items()publicWC 1.0

Check all cart items for errors.

Метод класса: WC_Cart{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

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

Код WC_Cart::check_cart_items() WC 8.7.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;

}