woocommerce_add_to_cart

woocommerce_add_to_cart

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

do_action('woocommerce_add_to_cart') is found 1 times:

  • /includes/class-wc-cart.php line 1286
    			}
    
    			$this->cart_contents = apply_filters( 'woocommerce_cart_contents_changed', $this->cart_contents );
    
    			do_action( 'woocommerce_add_to_cart', $cart_item_key, $product_id, $quantity, $variation_id, $variation, $cart_item_data );
    
    			return $cart_item_key;
    
    		} catch ( Exception $e ) {
    			if ( $e->getMessage() ) {
    				wc_add_notice( $e->getMessage(), 'error' );
    

See this hook used in plugins: