do_action( 'wooocommerce_store_api_validate_cart_item', WC_Product $product , array $cart_item )
Fire action to validate add to cart. Functions hooking into this should throw an \Exception to prevent add to cart from occurring.
Description Description
Parameters Parameters
- $product
-
Product object being added to the cart.
- $cart_item
-
Cart item array.
Source Source
File: packages/woocommerce-blocks/src/StoreApi/Utilities/CartController.php