Automattic\WooCommerce\Blocks

Migration::run_migrations()publicWC 1.0

Runs all the necessary migrations.

@var array

{} Это метод класса: Migration{}

Хуков нет.

Возвращает

null. Ничего.

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

$Migration = new Migration();
$Migration->run_migrations();

Код Migration::run_migrations() WC 6.9.4

public function run_migrations() {
	$current_db_version = get_option( Options::WC_BLOCK_VERSION, '' );

	if ( empty( $current_db_version ) ) {
		return;
	}

	foreach ( $this->db_upgrades as $version => $update_callbacks ) {
		if ( version_compare( $current_db_version, $version, '<' ) ) {
			foreach ( $update_callbacks as $update_callback ) {
				$this->{$update_callback}();
			}
		}
	}
}