WC_Install::maybe_update_db_versionprivate staticWC 3.2.0

See if we need to show or run database updates during install.

Метод класса: WC_Install{}

Хуков нет.

Возвращает

void. Ничего (null).

Использование

$result = WC_Install::maybe_update_db_version();

Список изменений

С версии 3.2.0 Введена.

Код WC_Install::maybe_update_db_version() WC 11.1.0

private static function maybe_update_db_version() {
	if ( self::needs_db_update() ) {
		/**
		 * Allow WooCommerce to auto-update without prompting the user.
		 *
		 * @since 3.2.0
		 */
		if ( self::is_db_auto_update_enabled() ) {
			wc_get_logger()->info( 'Automatic database update triggered.', array( 'source' => 'wc-updater' ) );
			self::update();
		} else {
			self::add_update_db_notice();
		}
	} else {
		self::update_db_version();
	}
}