Moving the WooCommerce Tickets form

Home Forums Ticket Products Event Tickets Plus Moving the WooCommerce Tickets form

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #932608
    penultimatemedia
    Participant

    I’m using the code from the documentation to change the order of the tickets form on the events page.

    This code works great however it causes problems when updating the plugin. Each time an update occurs I have to remove this code from my functions.php file, run the update then re-add it. Very annoying as the client as to come to me each time to run updates.

    Running the update without removing the code from functions.php causes the plugin update to fail and the website won’t load.

    Anyone got any ideas on this?

    Thanks
    Pete

    #932766
    Geoff
    Member

    Hi Pete, and welcome to the forums! Sorry you’re hitting some trouble here with the WooTickets snippet, but hopefully we can figure it out here together. 🙂

    Yeah, I see what you mean. I was able to recreate the issue when I reverted to an older version of The Events Calendar and tried to update with the snippet in my functions.php file. No bueno!

    This certainly wouldn’t be an issue in all situations, but for where does come up, it seems to be related to checking whether the TribeWooTickets class is set before running the snippet.

    Try wrapping each block of the snippet in a conditional that checks for the class first. For example, here’s what that looks like for the snippet to move the ticket form above the event description:

    https://gist.github.com/geoffgraham/eb1789cc42291a23eb36

    Give that a shot and let me me know if it helps.

    Cheers!
    Geoff

    #932778
    penultimatemedia
    Participant

    Hi Geoff,

    Great stuff, thanks for the quick reply!

    I’ve pasted in the code and the layout still works great. I’ll see what happens next time an update is ready and see if this fixes the issue.

    Thanks again for your help.

    Cheers
    Pete

    #932831
    Geoff
    Member

    My pleasure, man! Thanks for the heads up on that–I can see how that would be super annoying after a while.

    I’ll go ahead and close this thread, but please feel free to hit us up with a new one if anything else pops up–we’d be happy to help. 🙂

    Cheers!
    Geoff

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Moving the WooCommerce Tickets form’ is closed to new replies.