WC_Product_CSV_Importer::adjust_character_encoding()privateWC 1.0

Convert a string from the input encoding to UTF-8.

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

Хуков нет.

Возвращает

Строку. The converted string.

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

// private - только в коде основоного (родительского) класса
$result = $this->adjust_character_encoding( $value );
$value(строка) (обязательный)
The string to convert.

Код WC_Product_CSV_Importer::adjust_character_encoding() WC 8.7.0

private function adjust_character_encoding( $value ) {
	$encoding = $this->params['character_encoding'];
	return 'UTF-8' === $encoding ? $value : mb_convert_encoding( $value, 'UTF-8', $encoding );
}