WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
событие не описано

woocommerce_add_to_cart хук-событие . WC 1.0

Использование

add_action( 'woocommerce_add_to_cart', 'action_function_name_9437', 10, 6 );
function action_function_name_9437( $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
-

Где вызывается хук

WC_Cart::add_to_cart()
woocommerce_add_to_cart
CartController::add_to_cart()
woocommerce_add_to_cart
woocommerce/includes/class-wc-cart.php 1247
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 89-97
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']
);

Где используется хук в ядре WooCommerce

woocommerce/includes/class-wc-cart.php 55
add_action( 'woocommerce_add_to_cart', array( $this, 'persistent_cart_update' ) );
woocommerce/includes/class-wc-cart.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-cart.php 855
remove_action( 'woocommerce_add_to_cart', array( WC()->cart, 'calculate_totals' ), 20, 0 );
woocommerce/includes/class-wc-cart.php 862
add_action( 'woocommerce_add_to_cart', array( WC()->cart, 'calculate_totals' ), 20, 0 );