Skip to content

Instantly share code, notes, and snippets.

@elimn
Last active December 22, 2021 11:43
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save elimn/36b24ada494337b5dad7 to your computer and use it in GitHub Desktop.
Save elimn/36b24ada494337b5dad7 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
*/
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

andrasguseo commented Apr 2, 2021

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

@SilverskyLLC
Copy link

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