WC_Product_CSV_Importer::remove_utf8_bom()protectedWC 1.0

Remove UTF-8 BOM signature.

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

Хуков нет.

Возвращает

Строку.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->remove_utf8_bom( $string );
$string(строка) (обязательный)
String to handle.

Код WC_Product_CSV_Importer::remove_utf8_bom() WC 8.7.0

protected function remove_utf8_bom( $string ) {
	if ( 'efbbbf' === substr( bin2hex( $string ), 0, 6 ) ) {
		$string = substr( $string, 3 );
	}

	return $string;
}