Home › Forums › Ticket Products › Event Tickets Plus › Apostrophe in Sitename for Emailed Ticket
- This topic has 6 replies, 3 voices, and was last updated 10 years, 2 months ago by
Geoff.
-
AuthorPosts
-
January 4, 2016 at 5:31 am #1049545
Dan Feeley
ParticipantIf the sitename contains an apostrophe, the emailed ticket subject displays with the ascii code for the character. (e.g. You’re displays as:)

-
This topic was modified 10 years, 3 months ago by
Dan Feeley. Reason: ASCII code shows correct in page
January 4, 2016 at 7:11 am #1049808George
ParticipantHey @Danfeely,
I played around with this a bit and found that you should be able to keep the apostrophes by adding the following code to your theme’s functions.php file:
if ( function_exists( 'tribe_get_events' ) ) {
/**
* Prevent apostrophes from being encoded in email subjects.
*
* @link http://theeventscalendar.com/?p=1049545
*/
function tribe_1049545_subject( $title ) {
return wp_kses_decode_entities( $title );
}function tribe_1049545_headers( $headers ) {
return array( 'Content-Type: text/html; charset=UTF-8' );
}add_action( 'tribe_rsvp_email_subject', 'tribe_1049545_subject' );
add_filter( 'tribe_rsvp_email_headers', 'tribe_1049545_headers' );
}
It works for me – I hope it helps!
Cheers,
GeorgeJanuary 4, 2016 at 8:02 am #1049832Dan Feeley
ParticipantThanks George,
It does appear to work on RSVP tickets.
Any chance you have a fix for the wootickets side as well?Dan
January 4, 2016 at 8:53 am #1049893George
ParticipantHey Dan,
With WooCommerce it’s unfortunately a bit trickier. For the record, because of this thread we now have a bug ticket in our system and can hopefully fix this in our plugins some time in the next few release – so, thank you!
And these fixes will be robust, well-tested, etc.
The following suggestion is not well-tested, by contrast, so try this out and let me know if it helps at all – paste this into functions.php just like the above code:
if ( function_exists( 'tribe_get_events' ) ) {function tribe_1049545_wootickets( $subject ) {
return wp_kses_decode_entities( $subject );
}add_filter( 'wootickets_ticket_email_subject', 'tribe_1049545_wootickets' );
}
That might do the trick – let me know!
Thanks,
GeorgeJanuary 4, 2016 at 9:27 am #1049918Dan Feeley
ParticipantGeorge,
That appears to have done the trick. I’ll use this for now and keep an eye open for the official fix.
Thanks again.
January 4, 2016 at 9:29 am #1049924George
ParticipantGlad to hear it Dan – definitely check out the changelogs for our next few releases to see if this fix makes it in one of them (it will at some point, I just don’t know which specific release yet because we logged it mere hours ago! 🙂 ).
You can also keep tabs on release news at http://theeventscalendar.com/blog.
Best of luck with your site!
GeorgeFebruary 18, 2016 at 11:12 am #1077292Geoff
MemberHey there!
Just wanted to jump in here and let you know that we released Event Tickets Plus 4.0.5 last night and it included a fix for this issue. Please check your WordPress updates, or you can also grab the latest copy by logging into this site and heading to My Account > Downloads.
Thanks for your patience while we worked on this! Please feel free to open a new thread if you continue to experience the same issue or have any other questions that pop up during updating and we’d be happy to help. 🙂
Cheers!
Geoff -
This topic was modified 10 years, 3 months ago by
-
AuthorPosts
- The topic ‘Apostrophe in Sitename for Emailed Ticket’ is closed to new replies.
