WordPress at a glance
function is not described

wc_string_to_array() WC 3.0.0

Explode a string into an array by $delimiter and remove empty values.

No Hooks.

Return

Array. Nothing.

Usage

wc_string_to_array( $string, $delimiter );
$string(string) (required)
String to convert.
$delimiter(string)
Delimiter.
Default: ','

Changelog

Since 3.0.0 Introduced.

Code of wc_string_to_array() WC 5.3.0

<?php
function wc_string_to_array( $string, $delimiter = ',' ) {
	return is_array( $string ) ? $string : array_filter( explode( $delimiter, $string ) );
}