WC_Admin_Notices::add_custom_notice()
Add a custom notice.
{} It's a method of the class: WC_Admin_Notices{}
No Hooks.
Return
null
. Nothing.
Usage
$result = WC_Admin_Notices::add_custom_notice( $name, $notice_html );
- $name(string) (required)
- Notice name.
- $notice_html(string) (required)
- Notice HTML.
Code of WC_Admin_Notices::add_custom_notice() WC Admin Notices::add custom notice WC 6.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 ) ); }