Skip to content

v1.0.32

Choose a tag to compare

@nera-minhle nera-minhle released this 02 Jul 03:07
· 25 commits to main since this release

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 their lty_order_id meta, 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, optional clear-holds) with stock recalculation.
  • docs/ORDER-TICKET-CLEANUP.md — incident background and production runbook.