Ready to get started?Download WordPress


Events Manager
[resolved] Attendee List w/User Display Name and Ticket Name (3 posts)

  1. l8knight
    Posted 1 year ago #

    Since I posted my question in a resolved thread I am starting a new topic as the issue is open:

    I am trying to modify the attendeelist.php file so that it displays a list of attendees as:

    Display_Name Ticket_Name Booking_Comment

    I get the booking comment only. Not sure how to pull the user's display name from the wp_users table or the Ticket_Name from the em_tickets table.

    Here is the code I have:

    /* @var $EM_Event EM_Event */
    $people = array();
    $EM_Bookings = $EM_Event->get_bookings();
    if( count($EM_Bookings->bookings) > 0 ){
    	<table cellpadding="0" cellspacing="0" class="rsvp-comment-table" ><thead><tr><th class="rsvp-name" width="150">Name</th><th class="rsvp-comment" width="*">Role</th><th class="rsvp-comment" width="*">Comment</th></tr></thead><tbody>
    	$guest_bookings = get_option('dbem_bookings_registration_disable');
    	$guest_booking_user = get_option('dbem_bookings_registration_user');
    	foreach( $EM_Bookings as $EM_Booking){
    		if($EM_Booking->status == 1 && !in_array($EM_Booking->get_person()->ID, $people) ){
    			$people[] = $EM_Booking->get_person()->ID;
    			echo '<tr><td>'. $EM_Booking->get_person()->get_name() .' </td><td> ' . $EM_Booking->ticket_name. ' </td><td> ' . $EM_Booking->booking_comment. ' </td></tr>';
    		}elseif($EM_Booking->status == 1 && $guest_bookings && $EM_Booking->get_person()->ID == $guest_booking_user ){
    			echo '<tr><td>'. $EM_Booking->get_person()->get_name() .'</td></tr>';


  2. agelonwl
    Posted 1 year ago #

  3. l8knight
    Posted 1 year ago #

    Thank you! You are a rock star!

    I ended up just using the 2nd one, replacing the Attendeeslist.php content with that code and commenting out the parts I didn't want. Worked beautifully. I need to get my head back into object oriented programming, still do all my php the old fashioned way :(

    Thanks again, so happy this is working as intended now!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic