WC_Admin_Notices::add_notice() public WC 1.0
Show a notice.
{} Это метод класса: WC_Admin_Notices{}
Хуков нет.
Возвращает
Null. Ничего.
Использование
$result = WC_Admin_Notices::add_notice( $name, $force_save );
- $name(строка) (обязательный)
- Notice name.
- $force_save(true/false)
- Force saving inside this method instead of at the 'shutdown'.
Код WC_Admin_Notices::add_notice() WC Admin Notices::add notice WC 5.0.0
public static function add_notice( $name, $force_save = false ) {
self::$notices = array_unique( array_merge( self::get_notices(), array( $name ) ) );
if ( $force_save ) {
// Adding early save to prevent more race conditions with notices.
self::store_notices();
}
}