WC_Install::maybe_update_db_version()private staticWC 3.2.0

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

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

Хуки из метода

Возвращает

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

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

$result = WC_Install::maybe_update_db_version();

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

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

Код WC_Install::maybe_update_db_version() WC 8.7.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 ( apply_filters( 'woocommerce_enable_auto_update_db', false ) ) {
			self::update();
		} else {
			WC_Admin_Notices::add_notice( 'update', true );
		}
	} else {
		self::update_db_version();
	}
}