Export Out Attendees List

Home Forums Ticket Products Event Tickets Plus Export Out Attendees List

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1096618
    slny311
    Participant

    Is there anyway to output a csv of attendees? We want a CSV with the users name so we can output badges to print. The export csv currently outputs the order number,etc.

    #1097280
    George
    Participant

    Hey there,

    We unfortunately have a bug that prevents the names from being included in the CSV!

    Real sorry about that—we’re working on a fix for this!

    For now, you can ensure names are included in the CSV export by adding this snippet to your theme’s functions.php file:


    /**
    * Adds email and name columns to the attendee export data (CSV only).
    *
    * Filters via the tribe_events_tickets_attendees_csv_items hook; intended for use
    * with the initial 4.1 release of Event Tickets only.
    *
    * @param array $items
    * @return array
    */
    function attendee_export_add_purchaser_email_name( $items ) {
    $count = 0;

    foreach ( $items as &$attendee_record ) {
    // Add the header columns
    if ( 1 === ++$count ) {
    $attendee_record[] = 'Customer Email Address';
    $attendee_record[] = 'Customer Name';
    }
    // Populate the new column in each subsequent row
    else {
    // Assumes that the order ID lives in the first column
    $order = wc_get_order( (int) $attendee_record[0] );
    $attendee_record[] = $order->billing_email;
    $attendee_record[] = $order->billing_first_name . ' ' . $order->billing_last_name;
    }
    }

    return $items;
    }

    add_filter( 'tribe_events_tickets_attendees_csv_items', 'attendee_export_add_purchaser_email_name' );

    Cheers!
    George

    #1103472
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Export Out Attendees List’ is closed to new replies.