WC_Admin_Notices::add_custom_notice()public staticWC 1.0

Add a custom notice.

Метод класса: WC_Admin_Notices{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$result = WC_Admin_Notices::add_custom_notice( $name, $notice_html );
$name(строка) (обязательный)
Notice name.
$notice_html(строка) (обязательный)
Notice HTML.

Код WC_Admin_Notices::add_custom_notice() WC 8.7.0

public static function add_custom_notice( $name, $notice_html ) {
	self::add_notice( $name );
	update_option( 'woocommerce_admin_notice_' . $name, wp_kses_post( $notice_html ) );
}