Hello,
I’d like to suggest a small enhancement to the class Tribe__Events__Tickets__Tickets_Pro in order to customize the CSV export for custom columns. It’s very easy to implement because the filters are already defined.
Inside the the private class method _generate_filtered_attendees_list add:
$columns = $this->attendees_table->get_columns();
/*
* HACK -> Start
*/
$columns = apply_filters('manage_tribe_events_page_tickets-attendees_columns', $columns);
/*
* HACK -> End
*/
.. and this:
// Get the data
$items = Tribe__Events__Tickets__Tickets::get_event_attendees( $event_id );
/*
* HACK -> Start
*/
$items = array_map(function($item_array) use($export_columns, $columns) {
return array_reduce($export_columns, function($carry, $column) use($item_array, $columns){
if(isset($item_array[$column])) {
$carry[$column] = $item_array[$column];
} else {
$carry[$column] = apply_filters('tribe_events_tickets_attendees_table_column', null, $item_array, $column);
}
return $carry;
}, array());
}, $items);
/*
* HACK -> End
*/
Can you add this feature to the next version of Events Calendar Pro?