Forum Replies Created
Viewing 3 posts - 1 through 3 (of 3 total)
-
AuthorPosts
-
December 30, 2017 at 9:42 am in reply to: Maybe I found an issue regarding Tribe__Tickets__Tickets::get_event_attendees( ) #1415173Rene HansenParticipant
Yes Barry all good here : )
- This reply was modified 6 years, 4 months ago by Rene Hansen.
December 22, 2017 at 12:17 am in reply to: Maybe I found an issue regarding Tribe__Tickets__Tickets::get_event_attendees( ) #1411443Rene HansenParticipantHi Barry,
Yup and it didn’t make sense to me, but when I created more users and they bought tickets. I could see that the call returned all attendees. That could actually be a use case. It was not what I needed so I added the event_id again and it worked.
Php Storm also complained about the line but no error was thrown. Not even in the error log.
My method is used for a shortcode:
public function handle_attendees_shortcode($att){ $output = ''; if (isset($att['id']) && class_exists('Tribe__Tickets__Tickets') && function_exists( 'tribe_tickets_get_attendees' ) ) { $attendees = Tribe__Tickets__Tickets::get_event_attendees( intval($att['id']) ); $output .= '<div class="row">'; $output .= '<div class="col-md-3"><h5>Deltagere / købere</h5></div>'; $output .= '</div>'; $output .= '<div class="row">'; $pid = 0; foreach ( $attendees as $attendant ) { //$output .= '<pre>' . print_r( $attendant ) . '</pre>'; $output .= '<div class="col-md-3">' . $attendant['purchaser_name'] . '<br>' . $attendant['purchaser_email'] . '</div>'; $eid = $attendant['event_id']; } $output .= '</div>'; } $output .= '<div class="riiso-attendees-list"> <form method="post"> </form> </div>'; return $output; }
The shortcode is called from: plugins/the-events-calendar-community-events/src/views/community/event-list.php (and I am using it as a template file – i have added shortcode and send event->ID to the shortcode.
Hope it makes sense.
Best regards Thomas
December 20, 2017 at 11:16 am in reply to: tribe_tickets_get_attendees function giving me the result i expect. #1410133Rene HansenParticipantI found a solution myself : )
-
AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)