Home › Forums › Ticket Products › Event Tickets Plus › Getting attendee Meta using aatendee_id
- This topic has 4 replies, 2 voices, and was last updated 6 years, 3 months ago by Mike Staines.
-
AuthorPosts
-
February 8, 2018 at 10:54 am #1448043Mike StainesParticipant
Hi,
Following instuctions from this Thread
https://theeventscalendar.com/support/forums/topic/additional-columns-in-the-attendees-list-csv-export-2/I have been able to add a column to my exported csv. The problem I am having is getting the attendee meta so I can run a query to produce extra fields
I am able to use $item[‘attendee_id’] to retrieve the attendee ID for each attendee but I don’t know how to get the attendee name or retrieve data using that id.
Thanks
February 12, 2018 at 2:25 am #1450418AndrasKeymasterHi Mike,
Thanks for reaching out!
The attendee meta data is linked to the purchased ticket. (The attendee_id as well.)
You should be able to get the attendee meta with this function:
Supply it with the ID of the sold ticket, use ‘_tribe_tickets_meta’ as the meta key and ‘false’ as the single. Something like this:
$attendee_metadata = tribe_get_event_meta ( '123', '_tribe_tickets_meta', false );
This will return an array with the data.
Let me know if this helps.
Cheers,
AndrasFebruary 12, 2018 at 2:38 am #1450432Mike StainesParticipantThank you very much
February 12, 2018 at 3:58 am #1450506AndrasKeymasterSure think Mike, happy I could help!
Since this is marked resolved I am going to close this ticket, but if you need anything else related to this topic or another please create a new ticket and we’ll be happy to help.
Cheers,
AndrasPS: If you like our plugins, and you didn’t yet do so 🙂 we would be happy to receive a review in the wordpress.org repository. Thanks!
https://wordpress.org/support/view/plugin-reviews/the-events-calendar/
https://wordpress.org/support/view/plugin-reviews/event-tickets/PS2: We’d be also grateful if you would give us feedback on your satisfaction with support. Just click on one of the classy looking emojis below. 🙂 If you can spare a few words, that’s even better. Doublethanks!
-
AuthorPosts
- The topic ‘Getting attendee Meta using aatendee_id’ is closed to new replies.