Home › Forums › Ticket Products › Event Tickets Plus › Attendee Details in WooCommerce Zapier integration
- This topic has 10 replies, 4 voices, and was last updated 7 years, 2 months ago by Cliff.
-
AuthorPosts
-
January 24, 2017 at 8:01 am #1222945RyanParticipant
I’m trying to use the WooCommerce Zapier integration with Event Tickets Plus. The goal is to have a real-time updated spreadsheet of the ticket orders and attendee info.
The plugin is pulling all the standard fields, but I’m not having any luck yet in getting attendee details into the spreadsheet. Can you tell me where that info is stored? Do you have any code snippets up your sleeve that might help with this?
I know I’m asking for help getting your plugin to work with another plugin, which is always a tricky prospect, but any help you can offer is appreciated.
Thanks!
January 24, 2017 at 9:12 pm #1223370CliffMemberHi, Ryan.
For RSVP tickets, the Attendee Meta information gets stored in the _tribe_tickets_meta custom field, which is attached to a post of the tribe_rsvp_attendees custom post type.
Similarly for WooCommerce tickets, the Attendee Meta information gets stored in the _tribe_tickets_meta custom field, which is attached to a shop_order and/or a tribe_wooticket custom post type post.
As far as what code to leverage to get the Attendee Meta information into your application, I’d suggest looking through the files located in this directory: /wp-content/plugins/event-tickets-plus/src/Tribe/Meta/…
I hope this gets you headed in the right direction.
Please let me know how this goes for you. This would be a great thing for others to have too.
January 25, 2017 at 2:01 pm #1223974RyanParticipantOk, so the attendee info for Woocommerce orders isn’t actually stored in any Woocommerce meta fields. It’s only in the custom post meta field.
I’ll let you know if we get anywhere.
January 25, 2017 at 3:23 pm #1224046CliffMemberPlease let us know how you get along. 🙂
February 1, 2017 at 7:18 pm #1227961RyanParticipantWe were able to resolve this by modifying the Zapier plugin. Thanks for the tip on where to look for the attendee info.
February 2, 2017 at 6:03 am #1228120BrianParticipantRyan,
I’ve been following this thread, would you mind sharing how you modified that to work? Would love to get the same functionality. Thanks!
-BrianFebruary 2, 2017 at 7:14 am #1228145RyanParticipantEdit the /includes/trigger/WC_Zapier_Trigger_Order.php file. Insert the new code around line 363.
I’ve included some existing code in the snippet below to give context.
// Customer Notes (Private Notes aren't included) // Arrays are not very well supported by Zapier at this point, but we'll send the data anyway $order->notes = array(); // Array of order notes foreach ( $this->wc_order->get_customer_order_notes() as $order_note_data ) { $note = new stdClass(); $note->note = $order_note_data->comment_content; $note->date = WC_Zapier::format_date( $order_note_data->comment_date ); $note->author = $order_note_data->comment_author; $note->author_email = $order_note_data->comment_author_email; $order->notes[] = $note; } // event ticket data : Strider $order->ticket_info = array(); $ticket_meta = get_post_meta( $order_id , '_tribe_tickets_meta') ; $ticket_meta = array_pop( $ticket_meta ); foreach( $ticket_meta as $key => &$meta ) { foreach( $meta as &$data ) { $data['time'] = $data['preferred-time-slot']; $data['children'] = $data['we-require-childcare-for-the-following-number-of-children']; unset( $data['preferred-time-slot'] ); unset( $data['we-require-childcare-for-the-following-number-of-children'] ); } } $order->attendee_info = array_pop( $ticket_meta ); error_log( print_r( $order, true ), 3, dirname( __FILE__ )."/log.txt"); // --- ticket data end --- // // Order data needs to be an array. $order = (array) $order;
So far this is working for us. There’s always the possibility of refinement 🙂
February 2, 2017 at 8:37 am #1228289BrianParticipantThanks Ryan this will help out a lot!
February 2, 2017 at 8:40 am #1228293RyanParticipantWe’re working on ways to make it more portable between tickets/events/sites but that gives you the general idea 🙂
February 3, 2017 at 2:30 pm #1229207CliffMemberRyan, thanks so much for sharing your integration with https://woocommerce.com/products/woocommerce-zapier/!
-
AuthorPosts
- The topic ‘Attendee Details in WooCommerce Zapier integration’ is closed to new replies.