Home › Forums › Calendar Products › Events Calendar PRO › get_event_attendees
- This topic has 3 replies, 2 voices, and was last updated 8 years, 11 months ago by
studioviv.
-
AuthorPosts
-
May 4, 2017 at 3:51 am #1278470
studioviv
ParticipantHallo,
Since the last update we get an error.
Probably i’m using a function that is removed during a update or something?
Hopefully you will help me out, this is the code:<?php
$attendeeList = TribeEventsTickets::get_event_attendees($event_id);
$customerList = array();// Build a list of customers (by order ID)
if (is_array($attendeeList)) {
foreach ($attendeeList as $attendeeData)
//All orders are being treated as completed order, also suggested code snippet didn’t work
// if ($attendeeData[‘order_status’] === ‘completed’) {
// Record the order ID and number of attendees per order
if (!isset($customerList[$attendeeData[‘order_id’]])) {
$customerList[$attendeeData[‘order_id’]] = 1;
}
else {
$customerList[$attendeeData[‘order_id’]]++;
}
}
if (count($customerList) > 0) {
echo ‘<div class=”row”>’;foreach ($customerList as $orderID => $totalAttendees) {
$order = new WC_Order($orderID);$attendees = $totalAttendees;
if($attendees == “1”){
$intro = “”;
}else{
$intro = “– (met Introducée)”;
}
echo “<div class=’col-md-4′>{$order->billing_first_name} {$order->billing_last_name} $intro</div>”;
}echo ‘</div>’;
}// Is no one attending?
else {
echo ‘Voor dit event heeft nog niemand een kaartje, zorg dat je boven aan de lijst komt!
‘;
}?>
The error we have: Backend fatal error: PHP Fatal error: Uncaught Error: Class ‘TribeEventsTickets’ not found in /public_html/wp-content/themes/fem2business/tribe-events/single-event.php:71\nStack trace:\n#0 public_html/wp-content/plugins/the-events-calendar/src/functions/template-tags/general.php(45): include()\n#1 public_html/wp-content/plugins/the-events-calendar/src/Tribe/Templates.php(478): tribe_get_view()\n#2 public_html/wp-includes/class-wp-hook.php(298): Tribe__Events__Templates::load_ecp_into_page_template(‘
…’)\n#3 public_html/wp-includes/plugin.php(203): WP_Hook->apply_filters(‘
‘, Array)\n#4 public_html/wp-includes/post-template.php(240): apply_filters(‘the_content’, ‘.’)\n#5 public_html/wp-content/themes/ctheme/content-page.php(18): the_conten in public_html/wp-content/themes/ctheme/tribe-events/single-event.php on line 71\n
Thanks!
May 5, 2017 at 11:59 am #1279499Trisha
MemberHello, Dennis!
Thank you for using The Events Calendar! I can help with this ?
To get started, would you be so kind as to share your system information? That will allow me to check for possible conflicts and see your current calendar settings. You can snag that by heading to Events > Help, copying the information that is at the bottom of the screen, then pasting it here for me as a private reply.
Cheers,
TrishaMay 27, 2017 at 9:35 am #1289886Support Droid
KeymasterHey 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 -
AuthorPosts
- The topic ‘get_event_attendees’ is closed to new replies.
