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).

Method of the class: MigrationHelper{}

No Hooks.

Return

null. Nothing.

Usage

$result = MigrationHelper::migrate_country_states_for_misc_data( $country_code, $old_to_new_states_mapping ): void;
$country_code(string) (required)
The country that has the states for which the migration is needed.
$old_to_new_states_mapping(array) (required)
An associative array where keys are the old state codes and values are the new state codes.

MigrationHelper::migrate_country_states_for_misc_data() code WC 7.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 );
}