WordPress at Your Fingertips
action is not described

woocommerce_add_to_cart action-hook . WC 1.0

Usage

add_action( 'woocommerce_add_to_cart', 'action_function_name_4807', 10, 6 );
function action_function_name_4807( $cart_item_key, $product_id, $quantity, $variation_id, $variation, $cart_item_data ){
	// action...
}
$cart_item_key
-
$product_id
-
$quantity
-
$variation_id
-
$variation
-
$cart_item_data
-

Where the hook is called

WC_Cart::add_to_cart()
woocommerce_add_to_cart
CartController::add_to_cart()
woocommerce_add_to_cart
woocommerce/includes/class-wc-cart.php 1276
do_action( 'woocommerce_add_to_cart', $cart_item_key, $product_id, $quantity, $variation_id, $variation, $cart_item_data );
woocommerce/packages/woocommerce-blocks/src/StoreApi/Utilities/CartController.php 102-110
do_action(
	'woocommerce_add_to_cart',
	$cart_id,
	$this->get_product_id( $product ),
	$request['quantity'],
	$this->get_variation_id( $product ),
	$request['variation'],
	$request['cart_item_data']
);

Where in WP core the hook is used WooCommerce

woocommerce/includes/class-wc-cart-session.php 55
add_action( 'woocommerce_add_to_cart', array( $this, 'persistent_cart_update' ) );
woocommerce/includes/class-wc-cart-session.php 61
add_action( 'woocommerce_add_to_cart', array( $this, 'maybe_set_cart_cookies' ) );
woocommerce/includes/class-wc-cart.php 106
add_action( 'woocommerce_add_to_cart', array( $this, 'calculate_totals' ), 20, 0 );
woocommerce/includes/class-wc-form-handler.php 857
remove_action( 'woocommerce_add_to_cart', array( WC()->cart, 'calculate_totals' ), 20, 0 );
woocommerce/includes/class-wc-form-handler.php 864
add_action( 'woocommerce_add_to_cart', array( WC()->cart, 'calculate_totals' ), 20, 0 );