Tribe__Tickets__RSVP__Attendance_Totals::print_totals()
Prints an HTML (unordered) list of attendance totals.
Source
File: src/Tribe/RSVP/Attendance_Totals.php
public function print_totals() {
//Note this now uses the `attendees-totals-list` template, so the array values don't quite logically line up
$args = [
'total_sold_label' => _x( 'Total RSVPs:', 'attendee summary', 'event-tickets' ),
'total_complete_label' => _x( 'Going:', 'attendee summary', 'event-tickets' ),
'total_cancelled_label' => _x( 'Not Going:', 'attendee summary', 'event-tickets' ),
'total_sold' => $this->get_total_rsvps(),
'total_complete' => $this->get_total_going(),
'total_cancelled' => $this->get_total_not_going(),
'total_sold_tooltip' => '',
'total_completed_tooltip' => '',
'total_cancelled_tooltip' => '',
];
// Skip output if there are no RSVP attendees going/not going AND if there are no current RSVP tickets.
if ( false === $this->has_rsvp_enabled && 0 === $this->get_total_rsvps() && 0 === $this->get_total_going() && 0 === $this->get_total_not_going() ) {
return;
}
$html = tribe( 'tickets.admin.views' )->template( 'attendees-totals-list', $args, false );
/**
* Filters the HTML that should be printed to display RSVP attendance lines.
*
* @param string $html The default HTML code displaying going and not going data.
*/
$html = apply_filters( 'tribe_tickets_rsvp_print_totals_html', $html );
echo $html;
}