Tribe__Events__Tickets__Woo__Main not found.

Home Forums Ticket Products Event Tickets Plus Tribe__Events__Tickets__Woo__Main not found.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #992001
    Paul Gilliot
    Participant

    Hey 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 class Tribe__Events__Tickets__Woo__Main isn’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.
    #992004
    Paul Gilliot
    Participant
    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’) );
    }
    • This reply was modified 10 years, 8 months ago by Paul Gilliot. Reason: code wasn't displaying correctly in the main post above
    #992149
    Brian
    Member

    Hi,

    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

    #992420
    Paul Gilliot
    Participant

    The 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.

    #992633
    Brian
    Member

    I 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!

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Tribe__Events__Tickets__Woo__Main not found.’ is closed to new replies.