Display users phone number in attendees list?

Home Forums Ticket Products Event Tickets Plus Display users phone number in attendees list?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1159201
    Warren
    Participant

    Hi there, using Event Tickets Plus for a client who runs tours of a stately home. Each tour can have 50 visitors and all fine and set up. However they would like to print off a list of attendees who will be coming to each tour. Currently the attendees list shows the users name and email address but not their phone number. They need this should the tour need to be cancelled for whatever reason and can phone the person rather than emailing them as the response will be quicker.

    Can this be done at all and if so how?

    #1159436
    Gergana
    Participant

    Hello Warren,

    You can check the knowledgebase for this request.

    https://theeventscalendar.com/knowledgebase/add-phone-numbers-to-attendee-list/

    #For me is working perfectly. You should paste it into your theme/child-theme function.php file.

    #1159922
    Nico
    Member

    Hey Warren,

    Thanks for reaching out to us!

    Can you please let us know if what Gergana shared helps you out?

    @Gergana β†’ thanks a lot for jumping in to help here πŸ™‚

    Best,
    Nico

    #1159947
    Warren
    Participant

    Thank you for replying both. Yes, this has solved one part, in that the phone number is now displayed within the admin page. However, if you export the list, which is what they will do rather than printing the wordpress admin page out, then the phone number isn’t exported in the Ticket Type column. How can I get this to appear in the exported CSV file?

    #1160380
    Nico
    Member

    Hey Warren,

    Thanks for for confirming the ‘first part’ works πŸ™‚

    To add the phone to the CSV export paste the snippet blow in your theme’s (or child theme’s) functions.php file:

    /**
    * Add billing phone to CSV export
    */
    function tribe_csv_export_add_phone_column ( $columns ){

    return array_merge ( $columns, array('phone' => 'Phone') );
    }

    function tribe_csv_export_populate_phone_column ( $existing, $item, $column ) {

    if ( 'phone' == $column ) {

    $phone = get_post_meta( $item['order_id'], '_billing_phone', true );

    return $phone;
    }

    return $existing;
    }

    function tribe_csv_export_add_phone ( $post_id ) {

    add_filter( 'manage_' . get_current_screen()->id . '_columns', 'tribe_csv_export_add_phone_column', 20 );

    add_filter( 'tribe_events_tickets_attendees_table_column', 'tribe_csv_export_populate_phone_column', 10, 3 );

    }
    add_action( 'tribe_events_tickets_generate_filtered_attendees_list', 'tribe_csv_export_add_phone' );

    Please let me know if this makes it work as expected,
    Best,
    Nico

    #1160384
    Warren
    Participant

    Absolutely spot on, thank you so much!

    • This reply was modified 7 years, 8 months ago by Warren.
    #1160420
    Nico
    Member

    You are welcome Warren πŸ™‚

    I’ll go ahead and close out this thread, but if you need help with anything else please don’t hesitate to create a new one and we will be happy to assist you.

    Best,
    Nico

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Display users phone number in attendees list?’ is closed to new replies.