$field){ switch($field['type']){ case 'multiselect': case 'pcfmeselect':$return[$item]['type']='select';break; } } }*/ foreach ($return as $addon => $value) { switch ($value['type']) { case 'multiselect' : case 'pcfmeselect' : case 'radio' : $return[$addon]['type'] = 'select'; break; } if ($value['type'] == 'heading') { unset($return[$addon]); } else { if (isset($value['options'])) { if (is_array($value['options'])) { $tempoptions = $value['options']; } else { $tempoptions = explode(',', $value['options']); } } $optionsarray = array(); if (isset($tempoptions)) { foreach ($tempoptions as $val) { $optionsarray[$val] = $val; } } if ($return[$addon]['type'] === 'select') { $return[$addon]['options']=array(); if (!empty($optionsarray)) foreach ($optionsarray as $option_key => $option_text) { $return[$addon]['options'][$option_text]=$option_text; } } } } return $return; } } new APPMAKER_WC_checkout_fields();