Class TribeWooTickets not found after upgrade to Woocommerce tickets 3.4.1

Home Forums Ticket Products Event Tickets Plus Class TribeWooTickets not found after upgrade to Woocommerce tickets 3.4.1

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #111102
    Josh
    Participant

    Hi,
    I use the code found here https://theeventscalendar.com/moving-the-ticket-form/ to set the placement of our wootickets. I just upgraded the wootickets plugin to 3.4.1 from 3.4 and I got the fatal php error noted in the title. The error is being thrown when this action is called in my functions.php.

    I have reinstated 3.4 for the time being and I should note that I have and had not yet upgraded woocommerce to 2.1. I’m hesitant to make the change until I find out what the deal is with this error!

    #111840
    Barry
    Member

    Hi!

    Sorry to hear you’ve hit difficulties.

    The TribeWooTickets class is still a part of the WooCommerce Tickets plugin – so long as it is indeed active you shouldn’t have any problems. However, if for any reason the custom code in your template runs and WooCommerce Tickets is not active, then you could indeed see this sort of problem.

    One workaround is to test for the presence of the TribeWooTickets class before running those pieces of code, something like this:

    if ( class_exists( 'TribeWooTickets' ) ) {
        /* Add your remove/add action calls in here */
    }

    That should effectively insulate them from changes in the outside environment (such as WooCommerce Tickets being deactivated).

    Does that help at all?

    #112096
    Josh
    Participant

    Ah! I definitely should have done that… I should imagine that’s exactly what the problem is (the wootickets plugin not being activated)!

    Thank you!

    #138279
    Barry
    Member

    Closing this thread as it’s been quite a while – of course if we can help with anything else please do create a new thread. Thanks!

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Class TribeWooTickets not found after upgrade to Woocommerce tickets 3.4.1’ is closed to new replies.