WC_Install::remove_update_db_noticepublic staticWC 10.3.0

Removes the db update notice.

Method of the class: WC_Install{}

No Hooks.

Returns

null. Nothing (null).

Usage

$result = WC_Install::remove_update_db_notice();

Changelog

Since 10.3.0 Introduced.

WC_Install::remove_update_db_notice() code WC 10.3.3

public static function remove_update_db_notice() {
	if ( \WC_Admin_Notices::has_notice( 'update' ) ) {
		\WC_Admin_Notices::remove_notice( 'update', true );
	}

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