What is the Javascript event for an item being added to the cart in Woocommerce?
Read the source. From woocommerce-ajax.php (in the plugin’s root folder) Javascript/Ajax add to cart /** * AJAX add to cart * * @access public * @return void */ function woocommerce_ajax_add_to_cart() { global $woocommerce; check_ajax_referer( ‘add-to-cart’, ‘security’ ); $product_id = (int) apply_filters(‘woocommerce_add_to_cart_product_id’, $_POST[‘product_id’]); $passed_validation = apply_filters(‘woocommerce_add_to_cart_validation’, true, $product_id, 1); if ($passed_validation && $woocommerce->cart->add_to_cart($product_id, 1)) : // … Read more