Advertisement
eventsmanager

Custom Template: attendeespendinglist.php

Jan 20th, 2025
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. <?php
  2. /* @var $EM_Event EM_Event */
  3. $people = array();
  4. $EM_Bookings = $EM_Event->get_bookings();
  5. $status = array( 0, 4, 5 );
  6. if( count($EM_Bookings->bookings) > 0 ){
  7. ?>
  8. <ul class="event-attendees">
  9. <?php
  10. foreach( $EM_Bookings as $EM_Booking){ /* @var $EM_Booking EM_Booking */
  11. if( $EM_Booking->is_pending() && !in_array($EM_Booking->get_person()->ID, $people) ){
  12. $people[] = $EM_Booking->get_person()->ID;
  13. echo '<li>'. $EM_Booking->get_person()->get_name() .'</li>';
  14. }elseif( in_array($EM_Booking->booking_status, $status) && $EM_Booking->is_no_user() ){
  15. echo '<li>'. $EM_Booking->get_person()->get_name() .'</li>';
  16. }
  17. }
  18. ?>
  19. </ul>
  20. <?php
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement