WordPress at Your Fingertips
function is not described

WC_Product_Importer::explode_values() protected WC 3.2.0

Explode CSV cell values using commas by default, and handling escaped separators.

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

No Hooks.

Return

Array.

Usage

// protected - for code of main (parent) or child class
$result = $this->explode_values( $value, $separator );
$value(string) (required)
Value to explode.
$separator(string)
Separator separating each value.
Default: comma

Changelog

Since 3.2.0 Introduced.

Code of WC_Product_Importer::explode_values() WC 5.7.0

protected function explode_values( $value, $separator = ',' ) {
	$value  = str_replace( '\\,', '::separator::', $value );
	$values = explode( $separator, $value );
	$values = array_map( array( $this, 'explode_values_formatter' ), $values );

	return $values;
}