Hide "Who's Attending" by default

Home Forums Ticket Products Event Tickets Plus Hide "Who's Attending" by default

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1092841
    Craig
    Participant

    Hi

    I can see that I can hide this per event, but can I hide it by default
    Is there a hook/filter to remove it as my client has over 200 events in the system and I don’t want to have to do it one by one?

    Cheers
    Andy

    #1092871
    Geoff
    Member

    Hi Andy,

    Sorry about that! We definitely are working on a way to hide that option by default. In the meantime, here’s a snippet you add to your functions.php file to disable it across the board:

    /**
    * Disables the public attendee lists on all events
    *
    * Removes the tribe_events_single_event_after_the_meta action that injects the attendee
    * list that was introduced with the initial 4.1 release of Event Tickets Plus
    */
    function disable_attendee_list_on_post() {
    if ( ! class_exists( 'Tribe__Tickets_Plus__Attendees_List' ) ) {
    return;
    }
    
    remove_action(
    'tribe_events_single_event_after_the_meta',
    array(
    Tribe__Tickets_Plus__Attendees_List::instance(),
    'render'
    ),
    4
    );
    }
    
    add_action( 'wp', 'disable_attendee_list_on_post' );

    Please give that a try and let me know if it helps do the trick.

    Thanks!
    Geoff

    #1092901
    Craig
    Participant

    Awesome, that works thanks

    Cheers
    Andy

    #1092942
    Geoff
    Member

    Right on! Thanks for following up to let me know. 🙂

    Cheers,
    Geoff

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Hide "Who's Attending" by default’ is closed to new replies.