Automattic\WooCommerce\Database\Migrations

MigrationHelper::migrate_country_states_for_misc_data()private staticWC 1.0

Migrate state codes in all the required places in the database (except orders).

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

Хуков нет.

Возвращает

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

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

$result = MigrationHelper::migrate_country_states_for_misc_data( $country_code, $old_to_new_states_mapping ): void;
$country_code(строка) (обязательный)
The country that has the states for which the migration is needed.
$old_to_new_states_mapping(массив) (обязательный)
An associative array where keys are the old state codes and values are the new state codes.

Код MigrationHelper::migrate_country_states_for_misc_data() WC 8.7.0

private static function migrate_country_states_for_misc_data( string $country_code, array $old_to_new_states_mapping ): void {
	self::migrate_country_states_for_shipping_locations( $country_code, $old_to_new_states_mapping );
	self::migrate_country_states_for_tax_rates( $country_code, $old_to_new_states_mapping );
	self::migrate_country_states_for_store_location( $country_code, $old_to_new_states_mapping );
}