Home › Forums › Ticket Products › Event Tickets Plus › New question about old thread
- This topic has 11 replies, 4 voices, and was last updated 9 years, 4 months ago by
Murray.
-
AuthorPosts
-
December 8, 2016 at 8:59 am #1203282
Murray
ParticipantI’m referring to this thread – https://theeventscalendar.com/support/forums/topic/getting-started/#post-1172675
In October, I asked about removing the QR code from tickets and was given this code
if ( class_exists( ‘Tribe__Tickets_Plus__QR’ ) ) {add_action( ‘init’, ‘tribe_remove_qr_codes_from_ticket_emails’ );
function tribe_tickets_ticket_email_ticket_bottom() {
remove_action( ‘tribe_tickets_ticket_email_ticket_bottom’, array( ‘Tribe__Tickets_Plus__QR’, ‘inject_qr’ ) );
}
}But, shouldn’t that be this?
if ( class_exists( ‘Tribe__Tickets_Plus__QR’ ) ) {add_action( ‘init’, ‘tribe_remove_qr_codes_from_ticket_emails’ );
function tribe_remove_qr_codes_from_ticket_emails() {
remove_action( ‘tribe_tickets_ticket_email_ticket_bottom’, array( ‘Tribe__Tickets_Plus__QR’, ‘inject_qr’ ) );
}
}December 8, 2016 at 12:02 pm #1203393George
ParticipantIt should! Sorry about that Murray.
Best of luck with this snippet!
GeorgeDecember 8, 2016 at 1:09 pm #1203444Murray
ParticipantUnfortunately, that doesn’t work either, although it now no longer generates an error message! Any idea why it might be failing? Also, would it be possible to ‘retrofit’ the earlier thread (which is now locked) with the corrections?
December 9, 2016 at 8:00 am #1203852George
ParticipantSorry to hear that Murray, you may have some better luck by removing the remove_action call from within init, so that the code is like this:
if ( class_exists( 'Tribe__Tickets_Plus__QR' ) ) { remove_action( 'tribe_tickets_ticket_email_ticket_bottom', array( 'Tribe__Tickets_Plus__QR', 'inject_qr' ) ); }December 9, 2016 at 10:14 am #1204044Murray
ParticipantGeorge, that still doesn’t work. The darn QR code is still there. I want to remove it because there is no function to it for the purpose of this event – there’s no need to check in. You come, you hand in your ticket, you sit in a seat, you’re done!
December 9, 2016 at 2:47 pm #1204215George
ParticipantI’m sorry to hear this, Murray! This snippet has worked for a long time so I’m investigating why it’s no longer working according to your claims. I have reached out to other folks on our team for some assistance on this and will post an update here as soon as we’ve learned more.
Thanks for your patience!
GeorgeDecember 14, 2016 at 1:28 pm #1206134Nico
MemberHey Murray,
First of all thanks for the patience while we looked into this! By George’s request I reviewed the code above and verified it’s not actually working as you reported. Hence I came up with a new version of the snippet that’s working for me:
/* Tribe, remove QR code from tickets email */if ( class_exists( 'Tribe__Tickets_Plus__Main' ) && class_exists( 'Tribe__Tickets_Plus__QR' ) ) {
$qr_instance = Tribe__Tickets_Plus__Main::instance()->qr();
remove_action( 'tribe_tickets_ticket_email_ticket_bottom', array( $qr, 'inject_qr' ) );
}
Can you please give this new snippet a try and let us know if it works,
Best,
NicoDecember 14, 2016 at 1:56 pm #1206149Murray
ParticipantHmm – it still isn’t working for me. This is what I have –
if ( class_exists( ‘Tribe__Tickets_Plus__Main’ ) && class_exists( ‘Tribe__Tickets_Plus__QR’ ) ) {
$qr_instance = Tribe__Tickets_Plus__Main::instance()->qr();remove_action( ‘tribe_tickets_ticket_email_ticket_bottom’, array( $qr, ‘inject_qr’) );
}December 14, 2016 at 2:00 pm #1206152Nico
MemberMy bad Murray! The $qr_instance variable should be just $qr:
/* Tribe, remove QR code from tickets email */if ( class_exists( 'Tribe__Tickets_Plus__Main' ) && class_exists( 'Tribe__Tickets_Plus__QR' ) ) {
$qr = Tribe__Tickets_Plus__Main::instance()->qr();
remove_action( 'tribe_tickets_ticket_email_ticket_bottom', array( $qr, 'inject_qr' ) );
}
Let me know if it works now!
Thanks,
NicoDecember 14, 2016 at 2:19 pm #1206167Murray
ParticipantW00t! That one works! Thanks to Nico and George for hanging in there with me. My tickets no longer confuse people. ๐
December 15, 2016 at 3:23 pm #1206810Nico
MemberStocked to hear Murray! Thank YOU for the patience while we worked this out ๐
Iโll go ahead and close out this thread, but if you need help with anything else please donโt hesitate to create a new one and we will be happy to assist you.
Best,
Nico -
AuthorPosts
- The topic ‘New question about old thread’ is closed to new replies.
