WC_Product_Importer::explode_values()
Explode CSV cell values using commas by default, and handling escaped separators.
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. |
WC_Product_Importer::explode_values() WC Product Importer::explode values code WC 7.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; }