Waiting list remaining spots decrease twice per converted signup
-
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_listmeta (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:
- On order completion,
OrderTicket::order_status_completed()(core/Order/OrderTicket.php) persistsetn_global_waiting_list = max(0, current − quantity)— a destructive write to the stored limit. - 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 flaggedis_from_waiting_listwith 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.
- The
You must be logged in to reply to this topic.