Emailing attendee list shows order number not attendee name

Home Forums Ticket Products Event Tickets Plus Emailing attendee list shows order number not attendee name

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1094929
    Kate
    Participant

    Hello,

    When I email the attendee list to the owner of the event it shows order numbers but does not include the name of the attendee.
    example: http://screencast.com/t/cKRRCdS1T1

    I would like it to be able to show the information of who purchased the ticket rather than the order # how can I do that?

    Thanks!

    #1095208
    George
    Participant

    Hey @Kate,

    This is actually because of a bug in our last release, and while we have this fixed for the next release, to get things working in the meantime you can add the following code 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' );

    Sorry for the trouble!
    George

    #1101454
    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 ‘Emailing attendee list shows order number not attendee name’ is closed to new replies.