woocommerce_add_to_cart_message

The WooCommerce woocommerce add to cart message function.

Description

woocommerce_add_to_cart_message( $product_id ); 

Parameters (1)

0. $product_id
The product id.

Usage

  1. if ( !function_exists( 'woocommerce_add_to_cart_message' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-deprecated-functions.php'; 
  3.  
  4. // The product id. 
  5. $product_id = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = woocommerce_add_to_cart_message($product_id); 
  9.  

Defined (1)

The function is defined in the following location(s).

/includes/wc-deprecated-functions.php  
  1. function woocommerce_add_to_cart_message( $product_id ) { 
  2. wc_deprecated_function( __FUNCTION__, '3.0', 'wc_add_to_cart_message' ); 
  3. wc_add_to_cart_message( $product_id );