woocommerce_add_message filter-hookWC 2.1

Print a single notice immediately.

Usage

add_filter( 'woocommerce_add_message', 'wp_kama_woocommerce_add_message_filter' );

/**
 * Function for `woocommerce_add_message` filter-hook.
 * 
 * @param string $message The text to display in the notice.
 *
 * @return string
 */
function wp_kama_woocommerce_add_message_filter( $message ){

	// filter...
	return $message;
}
$message(string)
The text to display in the notice.

Changelog

Since 2.1 Introduced.

Where the hook is called

wc_print_notice()
woocommerce_add_message
wc_add_notice()
woocommerce_add_message
woocommerce/includes/wc-notice-functions.php 186
$message = apply_filters( 'woocommerce_add_message', $message );
woocommerce/includes/wc-notice-functions.php 84
$message = apply_filters( 'woocommerce_add_message', $message );

Where the hook is used in WooCommerce

Usage not found.