WordPress at Your Fingertips
function is not described

WC_Product_CSV_Exporter::filter_description_field() protected WC 3.5.4

Filter description field for export. Convert newlines to '\n'.

{} It's a method of the class: WC_Product_CSV_Exporter{}

No Hooks.

Return

String.

Usage

// protected - for code of main (parent) or child class
$result = $this->filter_description_field( $description );
$description(string) (required)
Product description text to filter.

Changelog

Since 3.5.4 Introduced.

Code of WC_Product_CSV_Exporter::filter_description_field() WC 5.9.0

protected function filter_description_field( $description ) {
	$description = str_replace( '\n', "\\\\n", $description );
	$description = str_replace( "\n", '\n', $description );
	return $description;
}