Skip to content

Instantly share code, notes, and snippets.

@cliffordp
Forked from elimn/tribe_neuter_qr.php
Last active April 2, 2021 19:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cliffordp/343bfe623aa4df8e4d649ba2d1c4bd5a to your computer and use it in GitHub Desktop.
Save cliffordp/343bfe623aa4df8e4d649ba2d1c4bd5a to your computer and use it in GitHub Desktop.
MT | TEC | Hide QR codes from the Email/Tickets sent to purchasers
<?php
/*
* Hides QR codes from the Email/Tickets sent to purchasers
* No longer needed as of https://theeventscalendar.com/maintenance-release-for-the-week-of-27-may-2018/
*/
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 );
@andrasguseo
Copy link

Hi all,

Note, that this code is not needed any more.
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment