Automattic\WooCommerce\Internal\Admin\Settings
SettingsUISchema::normalize_type
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() 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;
}