WC_Admin_Notices::get_notices
Get the value of the locally cached notices array for the current site.
Метод класса: WC_Admin_Notices{}
Хуков нет.
Возвращает
Массив.
Использование
$result = WC_Admin_Notices::get_notices();
Код WC_Admin_Notices::get_notices() WC Admin Notices::get notices WC 10.4.3
public static function get_notices() {
if ( ! self::$is_multisite ) {
return self::$notices;
}
$blog_id = get_current_blog_id();
$notices = self::$notices[ $blog_id ] ?? null;
if ( ! is_null( $notices ) ) {
return $notices;
}
self::$notices[ $blog_id ] = get_option( 'woocommerce_admin_notices', array() );
return self::$notices[ $blog_id ];
}