WC_Product_CSV_Importer::remove_utf8_bom()protectedWC 1.0

Remove UTF-8 BOM signature.

Method of the class: WC_Product_CSV_Importer{}

No Hooks.

Return

String.

Usage

// protected - for code of main (parent) or child class
$result = $this->remove_utf8_bom( $string );
$string(string) (required)
String to handle.

WC_Product_CSV_Importer::remove_utf8_bom() code WC 8.6.1

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

	return $string;
}