woocommerce_add_message
Print a single notice immediately.
Использование
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(строка)
- The text to display in the notice.
Список изменений
| С версии 2.1 | Введена. |
Где вызывается хук
woocommerce_add_message
woocommerce_add_message
woocommerce/includes/wc-notice-functions.php 203
$message = apply_filters( 'woocommerce_add_message', $message );
woocommerce/includes/wc-notice-functions.php 93
$message = apply_filters( 'woocommerce_add_message', $message );