• Resolved twoxim

    (@twoxim)


    The actual attendees from the events table is not accurate. It’s showing sold not the attendees.

    I fixed this by hard coding the wp-content/plugins/event-tickets/src/Tribe/Admin/Columns/Tickets.php file. I don’t if there’s a hook for this or not?

    Changed starting at line 99
    $content = sprintf( ‘<div>%s</div>%s’, $this->get_sold( $tickets ), $this->get_percentage_string( $tickets, $post_id ) );
    $attendees_link = tribe( ‘tickets.handler’ )->get_attendee_report_link( get_post( $post_id ) )

    Replaced with
    $deleted = Tribe__Tickets__Attendance::instance( $post_id )->get_deleted_attendees_count();
    $tickets_sold = $this->get_sold( $tickets );

    if($deleted <= $tickets_sold){
    $content = sprintf( ‘<div>%s</div>%s’, $tickets_sold-$deleted, $this->get_percentage_string( $tickets, $post_id ) );
    }else{
    $content = sprintf( ‘<div>%s</div>%s’, $tickets_sold, $this->get_percentage_string( $tickets, $post_id ) );
    }

    Change line 163
    $this_sold = $ticket->qty_sold();

    Replaced with:
    $deleted = Tribe__Tickets__Attendance::instance( $post_id )->get_deleted_attendees_count();
    $this_sold = $ticket->qty_sold();
    if($deleted <= $tickets_sold){
    $this_sold = $this_sold – $deleted;
    }

    Hope that helps someone

Viewing 1 replies (of 1 total)
  • Plugin Support Jaime

    (@jaimemarchwinski)

    Hi @twoxim,

    Thanks for the info! You may also be interested in our Themer’s Guide, which can show you how to safely copy and edit templates and views related to our plugin.

    Thanks!

Viewing 1 replies (of 1 total)
  • The topic ‘Attendees in table is not accurate’ is closed to new replies.