Home › Forums › Ticket Products › Event Tickets Plus › Order Email
- This topic has 4 replies, 4 voices, and was last updated 10 years, 2 months ago by
Support Droid.
-
AuthorPosts
-
January 24, 2016 at 8:02 pm #1061485
Raymond
ParticipantHey there,
We post tickets to customers – so ticket emails are disabled.
Order confirmation is all the customer receives.
However the ticket title is what is displayed in the confirmation, can we include the title and date on the order confirmation for both admin and customer?
See this screen for an explanation: http://cloudup.com/cm0k1RfLfHe
Thank yooooou
January 25, 2016 at 11:08 am #1062029Josh
ParticipantHey Raymond,
Thanks for reaching out to us!
For this, you’ll need to customize the WooCommerce generated order email. To get the additional information, you’ll need to first get the event ID associated with the purchased ticket. This is stored in the “_tribe_wooticket_for_event” meta for the product.
From there you can get the date and title using that ID. https://theeventscalendar.com/function/tribe_get_start_date/ and get_the_title($id) should be good ways to get that information.
Let me know if this helps.
Thanks!
February 1, 2016 at 7:07 am #1065726renaissancecreative
ParticipantHey Raymond,
I have just stumbled upon this looking for something else and have used some code I found on here for something else.
You can use:
add_filter( 'woocommerce_order_item_name' , 'woocommerce_cart_item_name_event_title', 10, 3 ); function woocommerce_cart_item_name_event_title( $title, $values, $cart_item_key ) { $ticket_meta = get_post_meta( $values['product_id'] ); $event_id = absint( $ticket_meta['_tribe_wooticket_for_event'][0] ); if ( $event_id ) { $title = sprintf( '%s for <a href="%s" target="_blank"><strong>%s</strong></a> on %s', $title, get_permalink( $event_id ), get_the_title( $event_id ), tribe_get_start_date( $event_id ) ); } return $title; }This displays the it as {ticket_name} for {event_name} on {event_date/time}
And you can use this exact same code and utilise for the filter in your cart by adding
add_filter( 'woocommerce_cart_item_name', 'woocommerce_cart_item_name_event_title', 10, 3 );February 2, 2016 at 6:37 am #1066376Josh
ParticipantHey renaissancecreative,
Awesome! Thanks for providing this info and snippet here!
Raymond, does this work to get the information you would like on the order email?
Thanks!
February 22, 2016 at 8:35 am #1079838Support Droid
KeymasterThis 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. -
AuthorPosts
- The topic ‘Order Email’ is closed to new replies.
