WC_Product_CSV_Importer::parse_description_field()
Parse a description value field
Method of the class: WC_Product_CSV_Importer{}
No Hooks.
Return
String
.
Usage
$WC_Product_CSV_Importer = new WC_Product_CSV_Importer(); $WC_Product_CSV_Importer->parse_description_field( $description );
- $description(string) (required)
- field value.
WC_Product_CSV_Importer::parse_description_field() WC Product CSV Importer::parse description field code 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 ); }