wc_add_to_cart_message_html
Usage
add_filter( 'wc_add_to_cart_message_html', 'wp_kama_wc_add_to_cart_message_html_filter', 10, 3 ); /** * Function for `wc_add_to_cart_message_html` filter-hook. * * @param $message * @param $products * @param $show_qty * * @return */ function wp_kama_wc_add_to_cart_message_html_filter( $message, $products, $show_qty ){ // filter... return $message; }
- $message
- -
- $products
- -
- $show_qty
- -
Where the hook is called
wc_add_to_cart_message_html
woocommerce/includes/wc-cart-functions.php 138
$message = apply_filters( 'wc_add_to_cart_message_html', $message, $products, $show_qty );
Where the hook is used in WooCommerce
woocommerce/src/Blocks/BlockTypes/AddToCartForm.php 33
add_filter( 'wc_add_to_cart_message_html', array( $this, 'add_to_cart_message_html_filter' ), 10, 2 );
woocommerce/src/Blocks/BlockTypes/AddToCartWithOptions.php 33
add_filter( 'wc_add_to_cart_message_html', array( $this, 'add_to_cart_message_html_filter' ), 10, 2 );