Fatal error: Class 'Tribe__Events__Tickets__Woo__Main' not found in…

Home Forums Ticket Products Event Tickets Plus Fatal error: Class 'Tribe__Events__Tickets__Woo__Main' not found in…

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1140803
    Christian Thomson
    Participant

    Hi there,

    I have a custom function in functions.php as per below:

    add_action( ‘init’, ‘wootickets_stop_sending_email’ );
    function wootickets_stop_sending_email() {
    $woo = Tribe__Events__Tickets__Woo__Main::get_instance();
    remove_filter( ‘woocommerce_email_classes’, array( $woo, ‘add_email_class_to_woocommerce’ ) );
    //add_action( ‘woocommerce_email_after_order_table’, array( $woo, ‘add_tickets_msg_to_email’ ) );
    }

    //remove_action(‘woocommerce_email_after_order_table’, array( $woo, ‘add_tickets_msg_to_email’), 10, 2 );

    remove_action(‘woocommerce_email_after_order_table’, array(Tribe__Events__Tickets__Woo__Main::get_instance(), ‘add_tickets_msg_to_email’), 10, 2 );

    add_action( ‘woocommerce_email_before_order_table’, ‘add_order_email_instructions’, 11, 2 );
    function add_order_email_instructions( $order, $sent_to_admin ) {
    /*if ( ! $sent_to_admin ) {*/
    echo ‘

    Additional Information for OFA Level 2 & 3 students

    <p>OFA Level 2 & 3 courses require pre-reading. Once you have booked and paid for your course, you should pick up your manuals from Monday through Friday 8:00AM to 4:00PM and on Saturdays from 9:00AM to 3:30PM.</p>’;
    /*}*/
    }

    But after installing and activating Event Tickets Plus (and deactivating WooTickets), I got this fatal error:
    Fatal error: Class ‘Tribe__Events__Tickets__Woo__Main’ not found in /home/content/p3pnexwpnas04_data02/89/2247189/html/wp-content/themes/valleyfirstaid/functions.php on line 258

    Can you please help me adjust this function so it works with Event Tickets Plus, so I can add it back to my functions.php?
    Thanks!
    Can you also reply-to my email: [email protected]?
    Cintia

    #1141104
    Florent
    Participant

    Hi,

    You can try replace :

    $woo = Tribe__Events__Tickets__Woo__Main::get_instance();

    by :

    $woo = Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance();

    #1141230
    Nico
    Member

    Hi there Cintia,

    Thanks for getting in touch!

    What Florent suggests seems to be the correct answer, the class name was change along the way!

    Please give this a try and let us know if it works.

    @Florent, thanks so much for jumping in ๐Ÿ™‚

    Best,
    Nico

    #1141338
    Christian Thomson
    Participant

    Thank you! That was it!

    #1141428
    Nico
    Member

    Thanks for confirming ๐Ÿ™‚

    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

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Fatal error: Class 'Tribe__Events__Tickets__Woo__Main' not found in…’ is closed to new replies.