Ticket Management
Ticket Management
This guide covers how tickets work and how to manage them.
How tickets work
Ticket generation
Tickets are automatically generated based on the Generate Tickets On setting in WooCommerce → Settings → Raffle → General:
| Setting | When Tickets Are Created |
|---|---|
| Payment Complete | As soon as payment is received |
| Order Processing | When order moves to "Processing" status |
| Order Completed | When order is marked "Completed" (default) |
No tickets are created for:
- Pending orders (unless the trigger setting is met).
- Cancelled or refunded orders.
Ticket information
Each ticket contains:
| Field | Description |
|---|---|
| Ticket Number | Unique identifier (e.g., 0001, RFL-0001, or A7X9B2) |
| Raffle | The raffle product |
| Holder Name | Person who holds the ticket |
| Purchaser Email | Email of person who bought |
| Recipient Email | Email of gift recipient (if gift) |
| Status | Active, Won, or Cancelled |
| Order ID | Associated WooCommerce order |
| Created Date | When ticket was generated |
Ticket number formats
Configure in WooCommerce → Settings → Raffle:
| Format | Example | Use Case |
|---|---|---|
| Sequential | 0001, 0002, 0003 | Traditional raffle feel |
| Random | A7X9B2, K3M8P1 | Harder to predict patterns |
Additional options:
- Prefix: Add text before number (e.g., "RAFFLE-0001")
- Starting Number: Begin from specific number
Customer view: my tickets
Accessing tickets
Customers find their tickets at: My Account → My Tickets
Ticket display
Each ticket shows:
- Ticket number
- Raffle name (linked to product)
- Status (Active/Won/Cancelled)
- Date purchased
- View Order link
Ticket badges
| Badge | Meaning |
|---|---|
| 🎁 Gifted | Customer bought this for someone else |
| 🎁 Received | Someone gifted this to the customer |
| ⭐ Won | This ticket won the raffle |
Filtering
Customers can filter tickets by:
- Raffle: Select specific raffle.
- Status: Active, Won, All.
PDF download
Click the PDF button to download:
- Professional PDF ticket with QR code.
- Includes all ticket details.
- QR code for validation at live events.
Admin view: raffle tickets
Access: WooCommerce → Raffle Tickets
Ticket list
View all tickets across all raffles:
- Ticket number
- Holder name
- Raffle product
- Order link
- Is Gift indicator
- Status
- Created date
Filtering
Filter tickets by:
- Raffle: Select specific raffle product.
- Status: Active, Won, Cancelled, All.
Export
Click Export CSV to download:
- All filtered tickets.
- Complete ticket data.
- Opens in Excel/Google Sheets.
Status management
Tickets automatically update:
| Order Status | Ticket Status |
|---|---|
| Completed | Active |
| Processing | Active (if Generate Tickets On is set to Processing) |
| Cancelled | Cancelled |
| Refunded | Cancelled |
Ticket reactivation
If a cancelled order is restored (e.g., moved back to Processing or Completed), the associated tickets are automatically reactivated, provided the raffle hasn't had winners drawn yet. This prevents having to re-purchase if an order was cancelled by mistake.
Tickets on order deletion
When an order is permanently deleted (trashed), all associated tickets are automatically cancelled. This prevents orphaned active tickets.
Manual status change: Not currently supported (by design; this maintains integrity).
Ticket statuses explained
Active
- Default status for valid tickets.
- Eligible for winner selection.
- Customer can view in My Account.
Won
- Set when ticket is selected as winner.
- Displayed with special styling.
- Shows position (1st, 2nd, etc.).
Cancelled
- Set when order is cancelled/refunded.
- Not eligible for winner selection.
- Still visible in history but marked cancelled.
Order integration
Order details (admin)
Raffle orders show a special metabox:
- 🎟️ Raffle Tickets section.
- All ticket numbers for that order.
- Gift information (if applicable).
- Quick links to ticket management.
Order details (customer)
In My Account → Orders → View Order:
- Ticket numbers listed per line item.
- Status indicators.
- Link to My Tickets page.
Cart quantity behavior
Per-customer limits
When a raffle has a Max Per Customer limit, the plugin enforces it across the entire flow:
- Product page: Quantity selector is capped at the limit.
- Cart page: Quantity is displayed as read-only (non-editable) for non-gift raffle items. This prevents customers from bypassing the limit.
- Server-side: Any attempt to increase quantity beyond the limit is automatically corrected.
Gift items
Gift raffle items are exempt from per-customer limits because each ticket goes to a different person. Gift item quantities remain editable in the cart and are managed through the recipient fields at checkout.
Data integrity
Security
- Tickets cannot be manually created (only via orders).
- Ticket numbers are validated for uniqueness.
- Database constraints prevent duplicates.
Audit trail
All ticket actions are logged:
- Creation
- Status changes
- Winner selection
- Validation/check-in
Troubleshooting
Tickets not generated
Check:
- Order status matches the Generate Tickets On setting (Completed, Processing, or Payment Complete).
- Product type is "Raffle".
- No PHP errors in debug log.
Fix:
- Check WooCommerce → Settings → Raffle → Generate Tickets On to confirm the trigger.
- Complete or process the order to match the trigger.
- Check WooCommerce → Status for system issues.
Duplicate tickets
This should never happen due to database constraints. If it does:
- Check database integrity.
- Contact support with details.
Missing tickets in my account
Check:
- Customer email matches purchaser/recipient email.
- Customer is logged in.
- Order is completed.
Performance
For stores with many tickets:
- Tickets are paginated (20 per page).
- Database queries are optimized.
- Consider limiting very large raffles.