Home › Forums › Ticket Products › Event Tickets Plus › Fatal error: Class 'Tribe__Events__Tickets__Woo__Main' not found in…
- This topic has 5 replies, 4 voices, and was last updated 7 years, 9 months ago by Christian Thomson.
-
AuthorPosts
-
July 16, 2016 at 2:50 pm #1140803Christian ThomsonParticipant
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 258Can 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]?
CintiaJuly 18, 2016 at 10:16 am #1141104FlorentParticipantHi,
You can try replace :
$woo = Tribe__Events__Tickets__Woo__Main::get_instance();
by :
$woo = Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance();
July 18, 2016 at 3:29 pm #1141230NicoMemberHi 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,
NicoJuly 18, 2016 at 10:32 pm #1141338Christian ThomsonParticipantThank you! That was it!
July 19, 2016 at 6:47 am #1141428NicoMemberThanks 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 -
AuthorPosts
- The topic ‘Fatal error: Class 'Tribe__Events__Tickets__Woo__Main' not found in…’ is closed to new replies.