• Resolved villalonengineering

    (@villalonengineering)


    Every waiting-list signup that is later completed (payment link flow) is subtracted twice from the remaining-spots figure the visitor sees.

    Environment: Eventin Free 4.1.21, WordPress 7.0.3, PHP 8.2, verified on a clean copy of the plugin (byte-identical to the wordpress.org zip).

    Real numbers from my site (waitlist limit 25; three signups of 7 + 3 + 1 = 11 tickets, all converted and completed):

    • The etn_global_waiting_list meta (and the admin panel) shows 14 — that is 25 − 11, discounted on completion.
    • The event page capacity line shows “Waiting List: 3 spots available” — that is 14 − 11, discounted again.

    Why it happens — two independent subtractions of the same signups:

    1. On order completion, OrderTicket::order_status_completed() (core/Order/OrderTicket.php) persists etn_global_waiting_list = max(0, current − quantity) — a destructive write to the stored limit.
    2. On render, the purchase widget computes remaining = max(meta − sum of waiting_list_count, 0), where waiting_list_count (core/event/Api/EventController.php → etn_get_waiting_list_counts_by_slug()) counts the same orders again.

    Each side alone would be correct; together the same 11 tickets are removed twice (limit 25 → real remaining should be 14 → the visitor sees 3).

    Related detail: etn_get_waiting_list_counts_by_slug() (utils/functions.php) counts orders flagged is_from_waiting_list with any status — cancelled or failed signups keep occupying spots forever, and trashed ones too.

    Impact: the public waitlist counter drains at twice the real speed and never recovers, so events show a full waiting list long before they are.

Viewing 1 replies (of 1 total)
  • Plugin Support Md Mahbub Morshed Chowdhury

    (@faheem96dev)

    Hi @villalonengineering,

    Thank you so much for the thorough report, precise mathematical breakdown, and deep dive into the code logic! Reports this detailed are incredibly valuable to our team.

    Our development team is currently investigating and checking this logic across the codebase. As soon as we have a fix prepared and tested, I will update you directly.

    Thank you again for bringing this to our attention and helping us improve Eventin!

    Best regards,
    M Mahbub

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.