Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Ian Dunn

    (@iandunn)

    When the number of remaining tickets is displayed on the order form, it’s being pulled from the get_remaining_tickets() method, which basically just does:

    $quantity = intval( get_post_meta( $post_id, 'tix_quantity', true ) );
    $remaining = $quantity - $this->get_purchased_tickets_count( $post_id );

    The get_purchased_tickets_count() method basically just counts the number of records in the Attendees post type that were created when tickets were purchased.

    Does that help?

    Thread Starter aaffleck

    (@aaffleck)

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Update remaining tickets’ is closed to new replies.