WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Платформа для конвертации и монетизации трафика
функция не описана


CartController::validate_cart_items() public WC 1.0

Validate all items in the cart and check for errors.

{} Это метод класса: CartController{}

Хуки из метода

Null. Ничего.


$CartController = new CartController();

Код CartController::validate_cart_items() WC 5.0.0

public function validate_cart_items() {
	$cart       = $this->get_cart_instance();
	$cart_items = $this->get_cart_items();

	foreach ( $cart_items as $cart_item_key => $cart_item ) {
		$this->validate_cart_item( $cart_item );

	// Before running the woocommerce_check_cart_items hook, unhook validation from the core cart.
	remove_action( 'woocommerce_check_cart_items', array( $cart, 'check_cart_items' ), 1 );
	remove_action( 'woocommerce_check_cart_items', array( $cart, 'check_cart_coupons' ), 1 );

	 * Hook: woocommerce_check_cart_items
	 * Allow 3rd parties to validate cart items. This is a legacy hook from Woo core.
	 * This filter will be deprecated because it encourages usage of wc_add_notice. For the API we need to capture
	 * notices and convert to exceptions instead.
	do_action( 'woocommerce_check_cart_items' );
	NoticeHandler::convert_notices_to_exceptions( 'woocommerce_rest_cart_item_error' );