WC_Notes_Run_Db_Update::add_noticepublic staticWC 10.3.0

Creates the db update note if needed.

Method of the class: WC_Notes_Run_Db_Update{}

No Hooks.

Returns

null. Nothing (null).

Usage

$result = WC_Notes_Run_Db_Update::add_notice();

Changelog

Since 10.3.0 Introduced.

WC_Notes_Run_Db_Update::add_notice() code WC 10.3.3

public static function add_notice() {
	$note = self::get_current_notice();
	if ( ! $note ) {
		$note = new Note();
		$note->set_name( self::NOTE_NAME );
		$note->save();
	}

	self::maybe_update_notice( $note );
}