WC_Admin_Notices::store_notices
Store the locally cached notices to DB.
Method of the class: WC_Admin_Notices{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = WC_Admin_Notices::store_notices();
WC_Admin_Notices::store_notices() WC Admin Notices::store notices code WC 10.4.3
public static function store_notices() {
$current_notices = self::get_notices();
$prev_notices = get_option( 'woocommerce_admin_notices', array() );
// Store notices.
update_option( 'woocommerce_admin_notices', $current_notices );
// Clean up removed notices.
foreach ( array_diff( $prev_notices, $current_notices ) as $notice ) {
if ( isset( self::$core_notices[ $notice ] ) ) {
continue;
}
delete_option( 'woocommerce_admin_notice_' . $notice );
}
}