WC_Admin_Notices::get_notices()public staticWC 1.0

Get the value of the locally cached notices array for the current site.

Method of the class: WC_Admin_Notices{}

No Hooks.

Return

Array.

Usage

$result = WC_Admin_Notices::get_notices();

WC_Admin_Notices::get_notices() code WC 8.9.0

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 ];
}