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".
  • Pending orders.
  • Processing orders (unless manually completed).
  • Cancelled or refunded orders.

Ticket Information

Each ticket contains:

FieldDescription
Ticket NumberUnique identifier (e.g., 0001, RFL-0001, or A7X9B2)
RaffleThe raffle product
Holder NamePerson who holds the ticket
Purchaser EmailEmail of person who bought
Recipient EmailEmail of gift recipient (if gift)
StatusActive, Won, or Cancelled
Order IDAssociated WooCommerce order
Created DateWhen ticket was generated

Ticket Number Formats

Configure in WooCommerce → Settings → Raffle:

FormatExampleUse Case
Sequential0001, 0002, 0003Traditional raffle feel
RandomA7X9B2, K3M8P1Harder to predict patterns
  • 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

BadgeMeaning
🎁 GiftedCustomer bought this for someone else
🎁 ReceivedSomeone gifted this to the customer
WonThis 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 StatusTicket Status
CompletedActive
CancelledCancelled
RefundedCancelled
Manual status change: Not currently supported (by design - 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.

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

  • Order status is "Completed".
  • Product type is "Raffle".
  • No PHP errors in debug log.
  • 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

  • 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.