WC_Admin_Notices::add_custom_notice
Add a custom notice.
Method of the class: WC_Admin_Notices{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = WC_Admin_Notices::add_custom_notice( $name, $notice_html );
- $name(string) (required)
- Notice name.
- $notice_html(string) (required)
- Notice HTML.
WC_Admin_Notices::add_custom_notice() WC Admin Notices::add custom notice code WC 10.8.1
public static function add_custom_notice( $name, $notice_html ) {
self::add_notice( $name );
update_option( 'woocommerce_admin_notice_' . $name, wp_kses_post( $notice_html ) );
}