{"id":1278470,"date":"2017-05-04T03:51:59","date_gmt":"2017-05-04T10:51:59","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/get_event_attendees\/"},"modified":"2017-05-05T12:00:08","modified_gmt":"2017-05-05T19:00:08","slug":"get_event_attendees","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/get_event_attendees\/","title":{"rendered":"get_event_attendees"},"content":{"rendered":"<p>Hallo,<\/p>\n<p>Since the last update we get an error.<br \/>\nProbably i&#8217;m using a function that is removed during a update or something?<br \/>\nHopefully you will help me out, this is the code:<\/p>\n<p><code>&lt;?php<br \/>\n$attendeeList = TribeEventsTickets::get_event_attendees($event_id);<br \/>\n$customerList = array();<\/code><\/p>\n<p>\/\/ Build a list of customers (by order ID)<br \/>\nif (is_array($attendeeList)) {<br \/>\nforeach ($attendeeList as $attendeeData)<br \/>\n\/\/All orders are being treated as completed order, also suggested code snippet didn&#8217;t work<br \/>\n\/\/ if ($attendeeData[&#8216;order_status&#8217;] === &#8216;completed&#8217;) {<br \/>\n\/\/ Record the order ID and number of attendees per order<br \/>\nif (!isset($customerList[$attendeeData[&#8216;order_id&#8217;]])) {<br \/>\n$customerList[$attendeeData[&#8216;order_id&#8217;]] = 1;<br \/>\n}<br \/>\nelse {<br \/>\n$customerList[$attendeeData[&#8216;order_id&#8217;]]++;<br \/>\n}<br \/>\n}<br \/>\nif (count($customerList) &gt; 0) {<br \/>\necho &#8216;&lt;div class=&#8221;row&#8221;&gt;&#8217;;<\/p>\n<p>foreach ($customerList as $orderID =&gt; $totalAttendees) {<br \/>\n$order = new WC_Order($orderID);<\/p>\n<p>$attendees = $totalAttendees;<br \/>\nif($attendees == &#8220;1&#8221;){<br \/>\n$intro = &#8220;&#8221;;<br \/>\n}else{<br \/>\n$intro = &#8220;\u2013 (met Introduc\u00e9e)&#8221;;<br \/>\n}<br \/>\necho &#8220;&lt;div class=&#8217;col-md-4&#8242;&gt;{$order-&gt;billing_first_name} {$order-&gt;billing_last_name} $intro&lt;\/div&gt;&#8221;;<br \/>\n}<\/p>\n<p>echo &#8216;&lt;\/div&gt;&#8217;;<br \/>\n}<\/p>\n<p>\/\/ Is no one attending?<br \/>\nelse {<br \/>\necho &#8216;<\/p>\n<p>Voor dit event heeft nog niemand een kaartje, zorg dat je boven aan de lijst komt!<\/p>\n<p>&#8216;;<br \/>\n}<\/p>\n<p>?&gt;<\/p>\n<p>The error we have: <strong>Backend fatal error: PHP Fatal error: Uncaught Error: Class &#8216;TribeEventsTickets&#8217; 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(&#8216;<\/strong><\/p>\n<p>&#8230;&#8217;)\\n#3 public_html\/wp-includes\/plugin.php(203): WP_Hook-&gt;apply_filters(&#8216;<\/p>\n<p>&#8216;, Array)\\n#4 public_html\/wp-includes\/post-template.php(240): apply_filters(&#8216;the_content&#8217;, &#8216;.&#8217;)\\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<\/p>\n<p>Thanks!<\/p>\n","protected":false},"template":"","class_list":["post-1278470","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>get_event_attendees -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/get_event_attendees\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"get_event_attendees -\" \/>\n<meta property=\"og:description\" content=\"Hallo, Since the last update we get an error. Probably i&#8217;m using a function that is removed during a update or something? Hopefully you will help me out, this is the code: &lt;?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) [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/get_event_attendees\/\" \/>\n<meta property=\"article:modified_time\" content=\"2017-05-05T19:00:08+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/get_event_attendees\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/get_event_attendees\/\",\"name\":\"get_event_attendees -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2017-05-04T10:51:59+00:00\",\"dateModified\":\"2017-05-05T19:00:08+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/get_event_attendees\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/get_event_attendees\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/get_event_attendees\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Calendar Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Events Calendar PRO\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"get_event_attendees\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"get_event_attendees -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/get_event_attendees\/","og_locale":"en_US","og_type":"article","og_title":"get_event_attendees -","og_description":"Hallo, Since the last update we get an error. Probably i&#8217;m using a function that is removed during a update or something? Hopefully you will help me out, this is the code: &lt;?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) [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/get_event_attendees\/","article_modified_time":"2017-05-05T19:00:08+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/get_event_attendees\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/get_event_attendees\/","name":"get_event_attendees -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2017-05-04T10:51:59+00:00","dateModified":"2017-05-05T19:00:08+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/get_event_attendees\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/get_event_attendees\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/get_event_attendees\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Calendar Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/"},{"@type":"ListItem","position":4,"name":"Events Calendar PRO","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/"},{"@type":"ListItem","position":5,"name":"get_event_attendees"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1278470","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1278470\/revisions"}],"predecessor-version":[{"id":1279500,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1278470\/revisions\/1279500"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1278470"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}