how to show total sold tickets without deleted
-
In Events List we have
Attendees
column with total sold tickets. The amount includes the deleted attendees, but i want to show amount without them.
function render_tickets_entry in \event-tickets\src\Tribe\Admin\Columns\Tickets.php
render this column.
this code solve the problem, is it possible do it without plugin changing?protected function render_tickets_entry( $post_id ) { $post = get_post( $post_id ); $totals = tribe( 'tickets.handler' )->get_post_totals( $post ); // Bail with — if ( 0 === $totals['tickets'] ) { return '—'; } $result_totals = (int)$totals['sold'] - absint( get_post_meta( $post_id, Tribe__Tickets__Attendance::DELETED_ATTENDEES_COUNT, true ) ); $content = sprintf( '<div>%s</div>%s', $result_totals, $this->get_percentage_string( $post->ID ) ); $attendees_link = tribe( 'tickets.attendees' )->get_report_link( $post ); return sprintf( '<a href="%s" target="_blank" class="tribe-tickets-column-attendees-link">%s</a>', $attendees_link, $content ); }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘how to show total sold tickets without deleted’ is closed to new replies.