This is the code (below here). It works when I keep it as saying ‘business’ – see the code I’ve used below. BUT then it says ‘business’ on the tickets and email notifications when I actually want it to say something like ‘Menu Choice’.
I also want it to be optional (as not all events will require it) but hide the *optional label as it might confuse people.
Eventually I also want to be able to export this field with the CSV guest list. I’ve read this but am not quite sure how to combine the two: https://docs.myeventon.com/documentations/how-to-add-additional-fields-to-download-attendees-csv-file/ Thank you!
add_filter(‘evotx_checkout_additional_fields_settings’,’evotx_2′,10,1);
function evotx_2($fields){
$fields[‘business’] = __(‘Menu Choice’,’evotx’);
// you can add other fields like this similarly
return $fields;
}
add_filter(‘evotx_additional_ticket_info_fields’, ‘evotx_1’, 10,1);
function evotx_1($fields){
// additonal field code block
$fields[‘business’] = array(
‘type’=>’text’,
‘label’=> evo_lang(‘Menu Choice if applicable’),
‘required’=> false,
);
// you can use same code block for more fields
return $fields;
}
add_filter(‘evotx_get_attendees_for_event’, ‘evotx_3’,10, 3);
function evotx_3($arr, $event_id, $_th){
if(!isset($_th[‘business’])) return $arr;
$arr[‘oD’][‘business’] = $_th[‘business’];
// the above 2 lines can be used for all other new fields
return $arr;
}