Apostrophe in Sitename for Emailed Ticket

Home Forums Ticket Products Event Tickets Plus Apostrophe in Sitename for Emailed Ticket

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1049545
    Dan Feeley
    Participant

    If 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
    #1049808
    George
    Participant

    Hey @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,
    George

    #1049832
    Dan Feeley
    Participant

    Thanks George,

    It does appear to work on RSVP tickets.
    Any chance you have a fix for the wootickets side as well?

    Dan

    #1049893
    George
    Participant

    Hey 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,
    George

    #1049918
    Dan Feeley
    Participant

    George,

    That appears to have done the trick. I’ll use this for now and keep an eye open for the official fix.

    Thanks again.

    #1049924
    George
    Participant

    Glad 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!
    George

    #1077292
    Geoff
    Member

    Hey 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

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Apostrophe in Sitename for Emailed Ticket’ is closed to new replies.