Home › Forums › Ticket Products › Event Tickets Plus › Tribe__Events__Tickets__Woo__Main not found.
- This topic has 4 replies, 2 voices, and was last updated 10 years, 8 months ago by
Brian.
-
AuthorPosts
-
July 30, 2015 at 6:43 pm #992001
Paul Gilliot
ParticipantHey everyone, I want my purchase button to display before the content is rendered to the page.
I tried adding `if (class_exists(‘Tribe__Events__Tickets__Woo__Main’)) {
remove_action( ‘tribe_events_single_event_after_the_meta’, array( Tribe__Events__Tickets__Woo__Main::get_instance(), ‘front_end_tickets_form’), 5 );
add_action( ‘tribe_events_single_event_before_the_content’, array( Tribe__Events__Tickets__Woo__Main::get_instance(), ‘front_end_tickets_form’) );
}` to my functions file but that doesn’t seem to do the job.
I found out that nothing in the if block is executed. I put a test echo statement and it didnt echo anything. If I put it outside the if block it does echo. It seems the classTribe__Events__Tickets__Woo__Mainisn’t being found. Can someone help here.Regards,
-
This topic was modified 10 years, 8 months ago by
Paul Gilliot.
-
This topic was modified 10 years, 8 months ago by
Paul Gilliot.
-
This topic was modified 10 years, 8 months ago by
Paul Gilliot.
-
This topic was modified 10 years, 8 months ago by
Brian.
July 30, 2015 at 6:47 pm #992004Paul Gilliot
Participantif (class_exists(‘Tribe__Events__Tickets__Woo__Main’)) { remove_action( ‘tribe_events_single_event_after_the_meta’, array( Tribe__Events__Tickets__Woo__Main::get_instance(), ‘front_end_tickets_form’), 5 ); add_action( ‘tribe_events_single_event_before_the_content’, array( Tribe__Events__Tickets__Woo__Main::get_instance(), ‘front_end_tickets_form’) ); }-
This reply was modified 10 years, 8 months ago by
Paul Gilliot. Reason: code wasn't displaying correctly in the main post above
July 31, 2015 at 8:42 am #992149Brian
MemberHi,
Sorry for the issues with this. I can help out.
I tested out the snippets from this page:
https://theeventscalendar.com/knowledgebase/moving-the-ticket-form/
And they all worked for me in my child theme. So that is good as at least the coding is working in some instances.
Since they are not working for you can you see about adding them to a custom plugin instead?
Also, please make sure you are using at least WooCommerce Tickets 3.10 as the class check will not work in older versions.
Let me know if you have any follow up questions.
Thanks
July 31, 2015 at 6:16 pm #992420Paul Gilliot
ParticipantThe code doesn’t seem to work in the functionality plugin from wordpress repo. I’ve checked the code of the plugin and it is loading after all other plugins have loaded. Hence it should pick up the class. But it isn’t for some reason. I decided to use child theme and the functions file with in. And now it works. Thanks for the help.
August 3, 2015 at 5:37 am #992633Brian
MemberI am glad to see you were able to figure it out.
I am going to go ahead and close this ticket. If you have a similar issue or another in the future, please do not hesitate to create a new ticket.
Thanks!
-
This topic was modified 10 years, 8 months ago by
-
AuthorPosts
- The topic ‘Tribe__Events__Tickets__Woo__Main not found.’ is closed to new replies.
