Home › Forums › Ticket Products › Event Tickets Plus › Display users phone number in attendees list?
- This topic has 7 replies, 4 voices, and was last updated 7 years, 8 months ago by Warren.
-
AuthorPosts
-
September 2, 2016 at 5:38 am #1159201WarrenParticipant
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?
September 2, 2016 at 11:12 am #1159436GerganaParticipantHello 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.
September 5, 2016 at 4:21 am #1159922NicoMemberHey 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,
NicoSeptember 5, 2016 at 5:43 am #1159947WarrenParticipantThank 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?
September 6, 2016 at 8:41 am #1160380NicoMemberHey 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,
NicoSeptember 6, 2016 at 8:45 am #1160384WarrenParticipantAbsolutely spot on, thank you so much!
- This reply was modified 7 years, 8 months ago by Warren.
September 6, 2016 at 9:15 am #1160420NicoMemberYou 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 -
AuthorPosts
- The topic ‘Display users phone number in attendees list?’ is closed to new replies.