woocommerce_store_api_validate_add_to_cart

woocommerce_store_api_validate_add_to_cart

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action

See hook in core

Displaying hooks found in version: woocommerce.9.5.1

do_action('woocommerce_store_api_validate_add_to_cart') is found 1 times:

  • /src/StoreApi/Utilities/CartController.php line 352
    		 *
    		 * @param \WC_Product $product Product object being added to the cart.
    		 * @param array       $request Add to cart request params including id, quantity, and variation attributes.
    		 */
    		do_action( 'woocommerce_store_api_validate_add_to_cart', $product, $request );
    	}
    
    	/**
    	 * Generates the error message for out of stock products and adds product names to it.
    	 *
    	 * @param string $singular The message to use when only one product is in the list.