Skip to content

woocommerce_add_to_cart_validation

Fazle Bari edited this page Jan 3, 2021 · 1 revision
apply_filters( 'woocommerce_add_to_cart_validation', $bool, $product_id, $quantity, $variation_id, $variation, $cart_item_data );

WC built-in filter to add cart of variation product.

Parameters

$bool

Returns default true

$product_id

(int) Get the product ID

$quantity

(int) Get cart quantity

$variation_id

(int) Get the variation ID

$variation

Get the variation

$cart_item_data

Get cart items data

Return

(boolean) Returns default true.

File Location

inludes/ajax_add_to_cart.php

Source Code

View Source Code

Clone this wiki locally