do_action( 'wooocommerce_store_api_validate_add_to_cart', WC_Product $product, array $request )

Fire action to validate add to cart. Functions hooking into this should throw an \Exception to prevent add to cart from occuring.


Description Description


Parameters Parameters

$product

Product object being added to the cart.

$request

Add to cart request params including id, quantity, and variation attributes.


Top ↑

Source Source

File: packages/woocommerce-blocks/src/StoreApi/Utilities/CartController.php



Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.