WC_Legacy_Coupon::format_array( string|array $array )
Format loaded data as array.
Description Description
Parameters Parameters
- $array
-
(Required)
Return Return
(array)
Source Source
File: includes/legacy/class-wc-legacy-coupon.php
public function format_array( $array ) { wc_deprecated_function( 'WC_Coupon::format_array', '3.0' ); if ( ! is_array( $array ) ) { if ( is_serialized( $array ) ) { $array = maybe_unserialize( $array ); } else { $array = explode( ',', $array ); } } return array_filter( array_map( 'trim', array_map( 'strtolower', $array ) ) ); }