Last active
December 22, 2021 11:43
-
-
Save elimn/36b24ada494337b5dad7 to your computer and use it in GitHub Desktop.
MT | TEC | Hide QR codes from the Email/Tickets sent to purchasers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Hides QR codes from the Email/Tickets sent to purchasers | |
*/ | |
function tribe_neuter_qr () { | |
if ( class_exists( 'Tribe__Tickets_Plus__Main' ) ) { | |
$qr_class = Tribe__Tickets_Plus__Main::instance()->qr(); | |
remove_action( 'tribe_tickets_ticket_email_ticket_bottom', array( $qr_class, 'inject_qr' ) ); | |
} | |
} | |
add_action( 'init', 'tribe_neuter_qr', 10 ); |
The new option is great but since they have added variables to the built in option (don't send for virtual, hybrid, etc... or even by event) this can still create the base for someone looking to to watch for a particular category or ticket id.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi all, cc @elimn
Note, that this code is deprecated.
Now there is a setting to show or hide the QR code from the ticket emails.
You can find it under Events > Settings > Tickets tab.
Andras from The Events Calendar team