Help Desk

Additional Columns in the Attendees list CSV export

  • Posts: 6 Topics: 5
    | Permalink

    I’m trying to include some additional fields in the Attendees CSV export.
    I managed to get the fields I want to show up in the Attendees list table using a customized version of the script below that I found while searching this form:

    add_filter( ‘manage_tribe_events_page_tickets-attendees_columns’, ‘add_my_custom_attendee_column’, 20 );
    add_filter( ‘tribe_events_tickets_attendees_table_column’, ‘populate_my_custom_attendee_column’, 10, 3 );

    function add_my_custom_attendee_column( $columns ) {
    $columns[‘custom_id’] = ‘Customer Address’;
    return $columns;
    }

    function populate_my_custom_attendee_column( $existing, $item, $column ) {
    if ( ‘custom_id’ !== $column ) return $existing;
    $order = new WC_Order( $item[‘order_id’] );
    $address = $order->get_billing_address();
    return esc_html( $address );
    }

    This works great, but the additional fields aren’t included in the CSV export. Any ideas on how I can get that portion working without digging in and hacking apart the plugin files?

    Thanks!

    Posts: 18146 Topics: 17 Answers: 973
    | Permalink

    I’m afraid that, at this time, there’s no easy path in this regard.

    The code you posted is intended to impact on the actual table visible in the attendee list screen – and it won’t impact on the CSV export. That raises an excellent point though and I’ll log this as an area in need of some further attention πŸ™‚

    Posts: 6 Topics: 5
    | Permalink

    Thanks for the response.
    Can you point me in the direction of where in the plug-in code base I can find the code that handles the CSV export for attendees?

    Posts: 18146 Topics: 17 Answers: 973
    | Permalink

    Certainly πŸ™‚

    Take a gander at:

    • TribeEventsTicketsPro::ajax_handler_attendee_mail_list()
    • TribeEventsTicketsPro::maybe_generate_attendees_csv()

    That should get you started here.

    Thanks again!

    Posts: 15 Topics: 6
    | Permalink

    This is an extension of this question here…
    https://theeventscalendar.com/support/forums/topic/attendees-export-csv-more-user-info-columns/

    So am I understanding this correctly, in that there’s no way to do this (getting our custom columns in the attendees list to export in the CSV), without modifying core plugin files?

    Thanks.

    Posts: 18146 Topics: 17 Answers: 973
    | Permalink

    I’m afraid so – or at least there aren’t any particularly straightforward means of doing this currently.

    Posts: 15 Topics: 6
    | Permalink

    Alright then, well that’s rather annoying, but thank you for the prompt reply.

    It sounds like you made it easier to display additional user information in the dashboard, but nothing was done to enable exporting that info in the CSV. I don’t know why would anyone only want to display the additional columns in the HTML table but not be able to export them in the CSV but I guess we’ll have to live with it for now. Hopefully this will be resolved in the future.

    We put on educational webinars quite regularly and we need to associate the attendees with their businesses, otherwise there’s no way for us to know what their relationship is with us. We just want to export the business name with the rest of the attendee’s info to import into our CRM and the fact that we can’t is driving me and my associates mad.

    Modifying core files is never a great idea. With Rob’s comments stating that these additional fields are something possibly slated for further development this fall, it would be a shame to use a bunch of resources to customize this if it might be resolved in 2-3 month’s time.

    In the meantime, as long as we can get the info displaying in the HTML table, we can simply copy and paste that to an Excel CSV.

    Posts: 18146 Topics: 17 Answers: 973
    | Permalink

    I definitely see where you’re coming from – and we’ve now got this logged so that we can try and rectify this oversight.

    As and when things progress we’ll do our best to update this thread – so please do check back and see how things are coming along (of course, if you’ve subscribed to email updates you’ll receive them that way) πŸ™‚

    Last but not least, because I don’t want to set your expectations inappropriately, it’s important to note there can be 1-2 months between releases (tending toward the former end of that scale) and at this stage any change is unlikely to make the very next release.

    Thanks again for your continued support and patience.

     

    Posts: 3443 Topics: 13 Answers: 199
    | Permalink

    Hi there,

    Thanks for bringing this issue to our attention. We weren’t able to get to it for our upcoming 3.8 release, but it is still very much on the radar. We hope to have it fixed in an upcoming release, and we will do our best to keep you posted on our progress. Thanks for your patience and support!

    Best,
    Leah
    and the team at Modern Tribe

    Posts: 3443 Topics: 13 Answers: 199
    | Permalink

    Hi there,

    I wanted to drop in here and let you know that this feature will be included in our upcoming release! We are putting the finishing touches on The Events Calendar 4.1 and are excited to make it available. Keep an eye on your Updates page for the new version and watch our blog for the release notes post.

    Thank you for supporting this feature and for your patience while we added it to the plugin.

    Best,
    Leah