WC_Install::add_update_db_noticeprivate staticWC 10.3.0

Adds the db update notice.

Method of the class: WC_Install{}

No Hooks.

Returns

null. Nothing (null).

Usage

$result = WC_Install::add_update_db_notice();

Changelog

Since 10.3.0 Introduced.

WC_Install::add_update_db_notice() code WC 10.3.3

private static function add_update_db_notice() {
	if ( ! \WC_Admin_Notices::has_notice( 'update' ) ) {
		\WC_Admin_Notices::add_notice( 'update', true );
	}

	try {
		if ( WC()->is_wc_admin_active() && false !== get_option( 'woocommerce_admin_install_timestamp' ) ) {
			\WC_Notes_Run_Db_Update::add_notice();
		}
	} catch ( Exception $e ) {
		wc_get_logger()->error( 'Error adding db update note: ' . $e->getMessage(), array( 'source' => 'wc-updater' ) );
	}
}