Home › Forums › Ticket Products › Event Tickets Plus › Ticket email subject
- This topic has 11 replies, 3 voices, and was last updated 5 years, 12 months ago by Cliff.
-
AuthorPosts
-
March 27, 2018 at 5:32 pm #1490183salilouParticipant
Hi,
I build a german site with event calendar pro and ticket plus.
I have set a custom ticket email subject (“Dein Ticket von {site_title}”), but the email has the default subject “Ihre Karten von {site_title}”. The difference is the formal and informal term of address.
Thank you!March 28, 2018 at 7:57 pm #1491281CliffMemberHi. Thanks for your detailed question.
It sounds to me like you think the translation that shipped with our plugins is not 100% correct.
We have this information regarding translations:
- Translating the premium plugins
- Translating The Events Calendar (free/core plugin)
- How to Override Plugin Language Files (custom language files on your own site)
- Customizing/Changing any bit of text (actual code snippet is at the very bottom) — or using the Say what? plugin (third-party, not guaranteed or supported by us) might be easier to setup and use to do the same thing as our provided code snippet
Please let me know if you need any further assistance.
March 29, 2018 at 2:42 am #1491434salilouParticipantThank you very much! The 4th link made it!
March 29, 2018 at 2:47 am #1491438salilouParticipantThis reply is private.
March 29, 2018 at 9:19 pm #1492402CliffMemberYou will need to follow our Themer’s Guide to override /wp-content/plugins/event-tickets/src/views/tickets/email.php
April 2, 2018 at 5:24 am #1494143salilouParticipantThank you for the hint, but I think you are wrong.
Isn’t your link the template of the ticket email?
I aim at the Woocommerce email!April 2, 2018 at 9:53 am #1494492CliffMemberGotcha. Sorry about that.
That text is loaded on the woocommerce_email_after_order_table action hook.
That text is able to be changed via the wootickets_email_message filter or translations (what I’m assuming you did), which is from /wp-content/plugins/event-tickets-plus/src/Tribe/Commerce/WooCommerce/Main.php
You could add another line break or two
<br>
at the end of that string.Let me know if you need some additional assistance.
April 2, 2018 at 10:38 am #1494532salilouParticipantYou are welcome 🙂 and thank you for the answer.
Main.php is a large file, which I would not like to copy to my child theme… is there an easier way to change the string?
I had tried it by using a string replacing function in my code snippet plugin, but line break tags are not interpreted there. Or do they, by adding back slashes maybe?
Another way could be to change the WC email template files, but that may be obsolete at the next update.April 2, 2018 at 6:16 pm #1494848CliffMemberMain.php is not able to be overridden via template overrides, since it’s not a template file. In other words, copying it to your child theme wouldn’t take any effect.
I believe this should work for you:
https://gist.github.com/cliffordp/46ffc5eb2fdfd7a76114ba72fba5b358
Please reference https://theeventscalendar.com/knowledgebase/implementing-custom-code-snippets/ for how to implement custom code snippets.
Please let me know how this goes for you.
April 2, 2018 at 6:53 pm #1494862salilouParticipantThats it!
Thank you very much!April 2, 2018 at 6:58 pm #1494865CliffMemberGreat! Thanks for letting me know.
-
AuthorPosts
- The topic ‘Ticket email subject’ is closed to new replies.