Ticket Management
Ticket Management
This guide covers how tickets work and how to manage them.
How Tickets Work
Ticket Generation
Tickets are automatically generated when:
- An order containing raffle products is completed.
- Payment is received and order status changes to "Completed".
No tickets are created for:
- Pending orders.
- Processing orders (unless manually completed).
- 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 |
| Cancelled | Cancelled |
| Refunded | Cancelled |
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.
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 is "Completed".
- Product type is "Raffle".
- No PHP errors in debug log.
Fix:
- Complete the order manually.
- 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.