Automattic\WooCommerce\Internal\Admin\Settings
SettingsUISchema::normalize_type
Normalize legacy field type.
Метод класса: SettingsUISchema{}
Хуков нет.
Возвращает
Строку.
Использование
$result = SettingsUISchema::normalize_type( $type ): string;
- $type(строка) (обязательный)
- Legacy field type.
Код SettingsUISchema::normalize_type() SettingsUISchema::normalize type 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;
}