Help Desk

Hide "Don't list me on the public attendee list" option

  • Posts: 6 Topics: 5
    | Permalink

    Hello, how can I hide the “Don’t list me on the public attendee list” checkbox option?

    The option used to be hidden due to this snippet I had put in “Additional CSS” in my theme:

    .tribe-tickets-attendees-list-optout {
    display: none;
    }

    That stopped working, so I did a web search, and someone said use this:

    tr .tribe-tickets-attendees-list-optout {
    display: none;
    }

    That doesn’t work either.

    I found an article that links to a code snippet that allows attendees to view their ticket information but not to modify their attendee information, their RSVP “Going / Not Going” status, and/or their “Don’t list me on the public attendee list” response here: https://theeventscalendar.com/knowledgebase/managing-your-orders-and-attendees/

    But that seems to be different than hiding the option in the first place. Also, neither the page with the link nor the page with the actual code indicates exactly where to put the code snippet (functions.php, but I have no idea what directory that is in).

    Follow up question: if I don’t hide the “Don’t list me on the public attendee list” option, and someone purchases a ticket, and checks that box, is that person counted in the number of attendees listed under “who’s attending”?

    Posts: 5028
    | Permalink

    Hello,

    Thanks for reaching out!

    To answer your second question, them checking the box only prevents their avatar from appearing on the front end – it does not affect the attendees list 🙂

    To hide the option, you can use this CSS:

    #buy-tickets .tribe-tickets-attendees-list-optout {
        display: none;
    }

    or do a template override of the tickets.php file found at wp-content/plugins/event-tickets-plus/src/views/wootickets – you’ll want to remove the following from your copy:

    if ( ! $hide_attendee_list_optout
    	 && class_exists( 'Tribe__Tickets_Plus__Attendees_List' )
    	 && ! Tribe__Tickets_Plus__Attendees_List::is_hidden_on( get_the_ID() )
    ) { ?>
    	<tr class="tribe-tickets-attendees-list-optout">
    		<td colspan="4">
    			<input
    				type="checkbox"
    				name="optout_<?php echo esc_attr( $ticket->ID ); ?>"
    				id="tribe-tickets-attendees-list-optout-edd"
    			>
    			<label for="tribe-tickets-attendees-list-optout-edd"><?php esc_html_e( "Don't list me on the public attendee list", 'event-tickets-plus' ); ?></label>
    		</td>
    	</tr>
    	<?php
    }

    We are limited in the amount of support that we can provide for customizations, but if you get stuck or have any questions, please let me know – I’ll be happy to try to point you in the right direction!

    Thanks,

    Jennifer

    Posts: 6 Topics: 5
    | Permalink

    The CSS worked, thanks for the answers!

    Posts: 5028
    | Permalink

    No problem! Let me know if there is anything else I can help you with 🙂

    Posts: 65
    | Permalink

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

    | Permalink