Hide Security Code on Tickets

Home Forums Ticket Products Event Tickets Plus Hide Security Code on Tickets

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1124247
    Janice Palmer
    Participant

    Is it possible to hide the SECURITY CODE on the Ticket that is emailed to the purchaser?

    Thank you,

    Janice Palmer
    Airdrie Web Design Ltd.

    #1124248
    Janice Palmer
    Participant
    #1124443
    George
    Participant

    Hey @Janice,

    Thanks for reaching out. This is possible, but unfortunately only with a bit of custom coding.

    Try heading into your theme’s functions.php file, and add this bit of code there:


    add_action( 'init', 'tribe_remove_qr_from_email' );
    add_action( 'admin_init', 'tribe_remove_qr_from_email' );

    function tribe_remove_qr_from_email() {
    remove_action( 'tribe_tickets_ticket_email_ticket_bottom', array( 'Tribe__Tickets_Plus__QR', 'inject_qr' ) );
    }

    ☝️ Let us know if that helps!

    — George

    #1124453
    Janice Palmer
    Participant

    Thank you George,

    It had no effect.

    Looking more closely at the code now and I was actually referring to the security code not the QR code. For example, in the row containing the ticket details it says:
    TICKET # TICKET TYPE PURCHASER and then SECURITY CODE 1938a45722

    I want to remove the security code but keep the QR code.

    Janice

    #1124478
    George
    Participant

    Sorry for misunderstanding that, Janice!

    Unfortunately, removing the Security Code is a bit more tricky. To do this, you have to make a custom template file in your theme.

    To learn how to do that, first check out the guide here ? https://theeventscalendar.com/knowledgebase/themers-guide/

    Override the default template in your theme by creating a file at:
    [your-theme]/tribe-events/tickets/email.php

    Then, find the original file in Event Tickets. It is located here within Event Tickets:
    event-tickets/src/views/tickets/email.php

    Copy and paste the WHOLE original file into the custom theme template version.

    Then, look for the line of code around line 343 or so. This is where the security code is echoed out into the file. I have highlighted this line of code in this Gist for you as an example ? https://git.io/voOVc

    You can then remove this code, or make it invisible, or anything else to satisfactorily modify your email template….

    Best of luck with your customizing!
    George

    #1124492
    Janice Palmer
    Participant

    Thank you George, would I also be able to add text using the custom template file method described above?

    Janice

    #1124824
    George
    Participant

    Hey Janice,

    Yes! You can indeed add any text, or other code, that you’d like.

    — George

    #1125012
    Janice Palmer
    Participant

    Thank you George, very helpful!

    #1125079
    George
    Participant

    😀

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Hide Security Code on Tickets’ is closed to new replies.