Home › Forums › Ticket Products › Event Tickets Plus › Different Ticket Emails for RSVP or WooCommerce
- This topic has 3 replies, 2 voices, and was last updated 6 years, 6 months ago by Luke Kenny.
-
AuthorPosts
-
September 24, 2017 at 9:33 am #1354026Luke KennyParticipant
Hi,
I would like to customise the ticket email that is sent out, however I would like to have one version for RSVP events and a slightly different version for WooCommerce events.
I believe both tickets are generated using the one template, /event-tickets/src/views/tickets/email.php which I can override in my theme.
Assuming I’m not missing something and I can’t just create separate overrides for RSVP or WooCommerce tickets, perhaps I can use some php to differentiate the ticket type, and use an if statement to inject the appropriate HTML at the relevant part of the email template.
Given I have access to the $tickets array, containing event_id, ticket_name, holder_name, order_id, ticket_id and security_code, is there a function that can return the ticket type, or maybe a true / false if it is a WooCoommerce ticket?
September 25, 2017 at 8:09 pm #1354693CliffMemberHi, Luke.
You’re correct about that email.php file being used for all the ticket emails.
I actually had to figure this out myself last week for an upcoming extension.
This link won’t work for long, but you can check out the code at https://github.com/moderntribe/products-extensions/blob/new-pdf-tickets-ext/event-tickets-pdf-tickets/index.php#L230 for one way to accomplish this.
For my own and your needs, I’ve filed a feature request for it to be simpler than this and to be accessible via the email.php template file.
Please let me know if you have any follow-up questions on this topic.
October 17, 2017 at 9:37 am #1364772Support DroidKeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Different Ticket Emails for RSVP or WooCommerce’ is closed to new replies.