Disable QR codes

Home Forums Ticket Products Event Tickets Plus Disable QR codes

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1039348
    Dirk
    Participant

    Hi guys,

    An official post about this.

    I think you’re getting somewhere in the long run with the QR codes but for now it’s not very usefull. Not if you use community tickets etc. We have our hopes up for the future tho!

    For now we would like to disable the QR codes. In the beta someone mentioned it could be disabled using:

    remove_action( ‘tribe_tickets_ticket_email_ticket_bottom’, array( Tribe__Tickets_Plus_Main::instance()->qr(), ‘inject_qr’ ) );
    

    Is this correct?

    Thank your!

    #1039860
    Nico
    Member

    Hey Dirk,

    Thanks for reaching out! Interesting question here 🙂

    The code seems to be fine, I would add a little test to check if the class Tribe__Tickets_Plus_Main exists, like this:


    if ( class_exists( 'Tribe__Tickets_Plus__Main' ) ) {
    remove_action( 'tribe_tickets_ticket_email_ticket_bottom', array( Tribe__Tickets_Plus_Main::instance()->qr(), 'inject_qr' ) );
    }

    Please give it a try and let me know if it works for you,
    Have a great weekend,
    Nico

    #1040284
    Dirk
    Participant

    Hi,

    Upon adding this to functions.php we got this error:
    Fatal error: Class ‘Tribe__Tickets_Plus_Main’ not found in /home/…/public_html/…/wp-content/…/functions.php on line 40

    Doing something wrong?

    Thanks

    #1041178
    Nico
    Member

    Hey Dirk,

    Thanks for the heads-up, I’ve just rechecked and there was a typo in there. Class name Tribe__Tickets_Plus__Main was missing an underscore, my bad sorry for that.

    Try this corrected version instead:

    if ( class_exists( 'Tribe__Tickets_Plus__Main' ) ) {
    remove_action( 'tribe_tickets_ticket_email_ticket_bottom', array( Tribe__Tickets_Plus__Main::instance()->qr(), 'inject_qr' ) );
    }

    Please let me know if it works as expected now,
    Best,
    Nico

    #1041314
    Dirk
    Participant

    That worked, thanks!

    We have some serious issues since updating to 4.0 but that’s something for a different thread I think. 🙂

    #1041647
    Nico
    Member

    Hey Dirk,

    Glad to hear that’s sorted 🙂

    We have some serious issues since updating to 4.0 but that’s something for a different thread I think.

    Yeap, it will be better if you open up a new thread for those issues. Having just a user/issue per thread usually makes them move faster. When creating the new thread please be sure to Test for conflicts and include your system information, that will surely help getting a better reply.

    I’ll go ahead and close out this thread as the issue here is resolved!

    Best,
    Nico

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Disable QR codes’ is closed to new replies.