Home › Forums › Ticket Products › Event Tickets Plus › Duplicate Ticket Emails
- This topic has 7 replies, 4 voices, and was last updated 10 years ago by
Support Droid.
-
AuthorPosts
-
April 4, 2016 at 4:29 pm #1098107
Brian
ParticipantHello,
I’m trying to figure out why duplicate ticket emails are being sent to the purchaser? A minimum of two emails will be sent for every purchase, if the customer has more items on the order another ticket email is sent for each line item.
So if only one ticket is on the order, 2 emails are sent.
If one ticket and one standard product is on the order 3 ticket emails are sent etc.The woocommerce customer order email adds the “You’ll receive your tickets in another email.” string as many times as the number of ticket emails sent.
The woocommerce admin email seems to add “You’ll receive your tickets in another email.” an extra two times, so if the customer email has it 3 times, the admin email has it 5.I was using wootickets before we upgraded to event tickets plus, not sure if that could have something to do with it?
All plugins and WordPress are running the latest updates.
Any ideas? Or suggestions on how to troubleshoot?
thanks
April 5, 2016 at 11:21 pm #1098803Geoff B.
MemberGood evening Brian and welcome back!
Thank you for reaching out to us.
We are sorry to hear about the extra unwanted emails being sent out when purchasing tickets.
I would love to help you with this topic.As a first troubleshooting step, could you please provide us with your system information in a private reply ? (following the instructions found in the link)
Secondly, could you tell me if you have template customizations in place (if there is a /tribe-events/ folder in your WordPress theme’s folder)
Finally, can you confirm if you followed the following when updating to ETP ? https://theeventscalendar.com/knowledgebase/moving-to-event-tickets-plus/
Best regards,
Geoff B.
April 6, 2016 at 9:01 am #1098962Bahram
ParticipantHello,
I’m a developer for the plugin purchaser.
We are having the same issue, ticket orders send out 2 duplicate emails. Please advise.
Thanks,
-KevinApril 6, 2016 at 10:17 am #1099027Brian
ParticipantThis reply is private.
April 6, 2016 at 11:02 am #1099060Brian
ParticipantGeoff,
Thank you for following up with me. To answer your questions, yes I have made template customizations and yes I followed the steps when upgrading from past versions of the plugin. I’ve done some more troubleshooting and found the cause of my issue. I added a ‘woocommerce_order_item_name’ filter shown below which was causing the issue.
/** * Add event title to order line item. */ add_filter( 'woocommerce_order_item_name', 'sq_woocommerce_order_item_name', 10, 2 ); function sq_woocommerce_order_item_name( $name, $item ) { $tribe = new Tribe__Tickets_Plus__Commerce__WooCommerce__Main(); $event_id = get_post_meta( $item['product_id'], $tribe->event_key, true ); get_the_title( $item['product_id'] ); get_permalink( $item['product_id'] ); if ( tribe_events_has_tickets( $event_id ) ) { $link = get_permalink( $event_id ); $event_date = tribe_get_start_date( $event_id, $display_time = true, 'M j \a\t g:ia' ); $name = $name . ' for <a href="' . $link . '">' . get_the_title( $event_id ) . '</a> - ' . $event_date; } return $name; }When I didn’t call get_the_title( $item[‘product_id’] ); before if ( tribe_events_has_tickets( $event_id ) ) The name it was returning was “Order Received”. Clearly this wasn’t the correct approach so I’ve updated my code to get the event title the proper way:
/** * Add event title to order line item. */ add_filter( 'woocommerce_order_item_name', 'sq_woocommerce_order_item_name', 10, 2 ); function sq_woocommerce_order_item_name( $name, $item ) { $event = tribe_events_get_ticket_event( $item['product_id'] ); if ( $event ) { $link = get_permalink( $event->ID ); $event_date = tribe_get_start_date( $event->ID, $display_time = true, 'M j \a\t g:ia' ); $name = $name . ' for <a href="' . $link . '">' . $event->post_title . '</a> - ' . $event_date; } return $name; }Just posting this info here incase anyone else encounters a similar issue.
Thanks for the support!April 6, 2016 at 5:39 pm #1099297Geoff B.
Member@Kevin we are sorry to hear that you are experiencing a similar issue. If the awesome answer provided by Brian did not help out, I would recommend opening your own support thread in order to receive the proper attention: https://theeventscalendar.com/support/post/
April 6, 2016 at 5:41 pm #1099299Geoff B.
MemberGood evening Brian,
Thank you so much for so generously providing your fix to the issue.
You are 100% right, with the current codebase, when the WooCommerce order status is changed to “Complete”, the ticket email gets triggered.
Is there anything else I can help you with on this topic ?
Best regards,
Geoff B.
April 21, 2016 at 9:35 am #1105478Support 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 ‘Duplicate Ticket Emails’ is closed to new replies.
