Move Ticket Form

Home Forums Ticket Products Event Tickets Plus Move Ticket Form

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1360345
    Aurélien
    Participant

    Hi,

    I’m using Event Ticket and Event Ticket Plus. I’m looking for a way to move the WooCommerce ticket form after my content. Could you tell me which hook should I use?

    An example here: https://fitness-challenges.com/formation/metafit-methode-originelle-hiit-training/

    The last table should be before the ticket form.

    #1360677
    Geoff B.
    Member

    Good evening Aurélien and welcome back!

    Thank you for reaching out to us.
    I would love to help you with this topic.

    In case you did not already know, we actually have a setting for that very purpose under Events -> Settings -> Tickets (Location of Tickets form).

    As noted, the default location of the RSVP and ticket forms is below the event meta. There are four possible locations where the forms can be displayed. Here is each location with its corresponding action hook:

    Above the content
    tribe_events_single_event_before_the_content

    Below the content
    tribe_events_single_event_after_the_content

    Above the meta
    tribe_events_single_event_before_the_meta

    While the names of the action hooks are self-descriptive, here is a visual reference of a real single event with each action hook’s location:

    [caption id="attachment_1151506" align="aligncenter" width="703"]These content hooks display on every single event, and are the locations to where you can move the tickets and RSVP forms. These content hooks display on every single event, and are the locations to where you can move the tickets and RSVP forms.[/caption]

    if ( class_exists( 'Tribe__Tickets_Plus__Commerce__WooCommerce__Main' ) ) {
    // Remove the form from its default location (after the meta).
    remove_action( 'tribe_events_single_event_after_the_meta', array( Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance(), 'front_end_tickets_form' ), 5 ); }

    if ( class_exists( 'Tribe__Tickets_Plus__Commerce__WooCommerce__Main' ) ) {
    // Place the form in the new location (before the content).
    add_action( 'tribe_events_single_event_before_the_content', array( Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance(), 'front_end_tickets_form' ), 5 ); }

    Let me know if that helps.

    Have a great day!

    Geoff B.

    #1361017
    Aurélien
    Participant

    Hi Geoff,

    thanks for your detailed answer. I can’t find an option in Ticket Plus as you described, maybe because I’m not using Events Calendar too?

    I tried to use the code provided but nothing change.

    #1361370
    Geoff B.
    Member

    Good evening Aurélien,

    Thank you for writing back.
    As a side note, we can absolutely switch to French if you prefer.

    You are absolutely right, good catch!
    These snippets will only work alongside the Events Calendar.

    I believe you will be better served with the following snippet as a foundation to work on: https://gist.github.com/GeoffEW/09005c81be890a562def47b05ae7fe3b

    Let me know how that goes.

    Best regards,
    Geoff B.

    #1361413
    Aurélien
    Participant

    Thanks for your gist! I’ll continue in English. 😉

    But it did not work as expected… anyway my client would like to manage tickets in a different way so my problem is no longer relevant.

    #1361920
    Geoff B.
    Member

    Hey Aurélien,

    I am mostly glad the issue is out of your hands, but I wish this would have been more helpful to you.

    You are welcome back in our support forums any time 🙂

    For now, I am going to close this thread.

    Have a great week!

    Geoff B.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Move Ticket Form’ is closed to new replies.