WC_Product_CSV_Importer::adjust_character_encoding()privateWC 1.0

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

Method of the class: WC_Product_CSV_Importer{}

No Hooks.

Return

String. The converted string.

Usage

// private - for code of main (parent) class only
$result = $this->adjust_character_encoding( $value );
$value(string) (required)
The string to convert.

WC_Product_CSV_Importer::adjust_character_encoding() code 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 );
}