Releases: Nera-Marketing/nera-instant-win-threshold
Releases · Nera-Marketing/nera-instant-win-threshold
Release list
v1.0.38
v1.0.37
v1.0.36
v1.0.35
v1.0.34
v1.0.33
v1.0.32
What's new in v1.0.32
Fix — orphaned pending-ticket cleanup fallback. LFW's cancel/refund cleanup depends on the lty_ticket_ids_in_order order meta and never runs on trash/delete. When it misses, lty_ticket_pending posts survive, count as "placed" in LFW's stock recalculation on product save, and eventually drive the product to negative stock — WooCommerce then blocks add-to-cart while the progress bar still shows tickets available (incident 2026-07-02, product 112077: 12,942 orphans from three trashed bulk orders set stock to −4 at 17,058/30,000 sold and locked 11 instant-win prizes).
inc/order-ticket-cleanup-fallback.php— on order cancel/refund/fail/trash/delete (after LFW's own handlers), removes leftover pending tickets by theirlty_order_idmeta, resets locked instant-win logs, prunes both hold-ticket metas, and flushes LFW counter transients. No-op when LFW's cleanup worked.scripts/fix-orphaned-lottery-tickets.php— WP-CLI repair for existing orphans (dry-run by default;apply, optionalclear-holds) with stock recalculation.docs/ORDER-TICKET-CLEANUP.md— incident background and production runbook.
v1.0.31
v1.0.30
v1.0.29
Nera – Instant Win Rules v1.0.29
Admin — Export / import
- Faster large imports — Nera Rule Type / Ticket % columns are re-read only for the current import batch (byte offset bounds), not the entire CSV on every batch.
- Safe cross-product copy — Uploading a CSV exported from another competition blanks foreign rule IDs so LFW creates new rules under the target product instead of updating (and corrupting) the source.
- Ticket range guard — Import rows with out-of-range numeric ticket numbers fail with the same validation as the inline Add/Save flows.
- Display-mode mismatch guard — Group-mode CSV rows cannot silently import into a Default-mode product; the row fails with an actionable error. Deliberate flatten still possible via
nera_iwt_allow_import_mode_mismatch. - Export scope — CSV export continues to include Rule Type + Ticket % only (Schedule datetimes intentionally excluded while Schedule Prize type is off by default).
REST — Instant wins API
- Group display mode — Products set to "Display Prizes by Group" now receive a proper grouped REST payload: prize groups with
tickets[], winner details, and merged rule visibility across logs in each group. - Default mode — Existing flat payload preserved; adds
display_mode: "default"for clients to branch on. - Shared schedule logic — Schedule display fields derived via one helper for parity between modes.
Removed
- Internal dev test scripts (not included in the distributable zip).
Upgrade
Sites on v1.0.28 can update via WordPress Dashboard → Updates (Plugin Update Checker). No database migration required.