I am also trying to update the list. I want to show:
DisplayName Ticket_Name Booking_Comment
Right now I can get the comment, the person’s real name is shown instead of display name.
My code:
<?php
/* @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>
<?php
$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() .'</li>';
}
}
?>
</tbody></table>
<?php
}