WC_Product_CSV_Importer::parse_description_field()publicWC 1.0

Parse a description value field

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

Хуков нет.

Возвращает

Строку.

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

$WC_Product_CSV_Importer = new WC_Product_CSV_Importer();
$WC_Product_CSV_Importer->parse_description_field( $description );
$description(строка) (обязательный)
field value.

Код WC_Product_CSV_Importer::parse_description_field() WC 8.7.0

public function parse_description_field( $description ) {
	$parts = explode( "\\\\n", $description );
	foreach ( $parts as $key => $part ) {
		$parts[ $key ] = str_replace( '\n', "\n", $part );
	}

	return implode( '\\\n', $parts );
}