WC_Product_CSV_Importer::parse_description_field
Parse a description value field
Метод класса: WC_Product_CSV_Importer{}
Хуков нет.
Возвращает
string.
Использование
$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 Product CSV Importer::parse description field WC 11.1.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 );
}