WC_Product_CSV_Importer::parse_comma_field()publicWC 1.0

Parse a comma-delineated field from a CSV.

Method of the class: WC_Product_CSV_Importer{}

No Hooks.

Return

Array.

Usage

$WC_Product_CSV_Importer = new WC_Product_CSV_Importer();
$WC_Product_CSV_Importer->parse_comma_field( $value );
$value(string) (required)
Field value.

WC_Product_CSV_Importer::parse_comma_field() code WC 8.7.0

public function parse_comma_field( $value ) {
	if ( empty( $value ) && '0' !== $value ) {
		return array();
	}

	$value = $this->unescape_data( $value );
	return array_map( 'wc_clean', $this->explode_values( $value ) );
}