Use an HTML link in a Box Office ticket email so the recipient can open their ticket from descriptive link text.
Note:
This is a Developer level doc. If you are unfamiliar working with code and resolving potential conflicts, we recommend you work with a Woo Agency Partner for larger projects, or find a WooCommerce developer on Codeable for smaller customizations. We are unable to provide support for customizations under our Support Policy.
Before you begin
↑ Back to topUse a test site with WooCommerce and WooCommerce Box Office active, a ticket product, and an email address you control. Enable Box Office ticket emails and configure the product’s ticket contact email field. Use fictional attendee details for testing.
Add the ticket link
↑ Back to top- Go to Products > All Products and edit the ticket product.
- Open Product data > Ticket Emails.
- In the email content editor, select Text to edit the HTML and add the following example.
<a href="{ticket_link}">View your ticket</a>
Select Update to save the product. Box Office replaces {ticket_link} with the individual ticket’s URL. The placeholder supplies the URL; the surrounding HTML makes View your ticket clickable. The placeholder by itself doesn’t create an HTML link.
Personalize the email
↑ Back to topUse a ticket field’s exact label inside braces to include its value. For a field labelled First Name, use {First Name}. A different label or capitalization won’t match. The same field-label placeholders can be used in the email subject.
Other email placeholders
↑ Back to topThe email content also accepts these placeholders:
| Placeholder | Value |
|---|---|
{ticket_id} | The ticket’s numeric ID. |
{post_title} | The ticket’s title. |
{post_content} | The ticket product’s description. |
{product_price} | The ticket product’s formatted price. |
{product_sku} | The ticket product’s SKU. |
{barcode} | The ticket barcode, when WooCommerce Order Barcodes is installed and active. |
{token} | The ticket’s private access token, for links to ticket-restricted content. |
Link to ticket-restricted content
↑ Back to topFor a page protected by the Box Office [ticket_private_content] shortcode or Private Content block, add the ticket token to that page’s URL. Replace the example destination with the actual page and match its ticket product:
<a href="https://example.com/workshop/?token={token}">Open workshop content</a>
Check access using a valid paid ticket for that product. Treat ticket links and tokens as private access credentials. Don’t place real values in public examples, screenshots, or shared logs.
Verify and troubleshoot
↑ Back to topPlace a test order using a contact email address you control. Open the ticket email and select View your ticket. It should open the matching ticket. If the order contains several tickets, check each email separately.
If HTML appears as text, check that you added it in the editor’s Text view. If a placeholder remains visible, check the spelling and the ticket field’s exact label. If no ticket email arrives, check the Box Office email settings and the ticket’s contact email address.
Questions and support
↑ Back to topSomething missing from this documentation? Still have questions and need assistance?
- If you have a question about a specific extension or theme you’d like to purchase, contact us to get answers.
- If you already purchased this product and need some assistance, get in touch with a Happiness Engineer via our support page and select this product’s name from the Product dropdown.