Automattic\WooCommerce\Internal\Admin\Settings

SettingsUISchema::normalize_typeprivate staticWC 1.0

Normalize legacy field type.

Method of the class: SettingsUISchema{}

No Hooks.

Returns

String.

Usage

$result = SettingsUISchema::normalize_type( $type ): string;
$type(string) (required)
Legacy field type.

SettingsUISchema::normalize_type() code WC 10.9.1

private static function normalize_type( string $type ): string {
	$type_map = array(
		'multiselect'            => 'array',
		'multi_select_countries' => 'array',
		'single_select_country'  => 'select',
		'single_select_page'     => 'select',
	);

	return $type_map[ $type ] ?? $type;
}