Configure gift vouchers
POM Gift Vouchers turn selected WooCommerce products into numbered, expiring vouchers delivered as PDFs after a qualifying paid order state. Each eligible order line creates one voucher that records the purchased quantity.
Voucher products are purchased separately: adding one to a non-empty cart removes the existing cart contents and displays a notice.
Plan the voucher contract
Before configuration, decide:
- what the voucher entitles the holder to receive;
- what quantity means for this product;
- expiry and redemption conditions;
- the code prefix, suffix, and numbering sequence;
- who receives the voucher email;
- what staff will check and record when redeeming it.
The product page, checkout, email, PDF, and redemption process must describe the same terms.
Configure numbering and PDF templates
- Go to Settings → POM Theme → E-Commerce → Promotions → Gift vouchers settings.
- Enable the feature.
- Set Next voucher number.
- Set the optional Voucher prefix and Voucher suffix.
- Add at least one PDF template.
- Give the template a clear internal name.
- Write its header, body, and footer HTML.
- Enable Phone number only when recipient contact is genuinely required.
- Save the settings.

The next number increments as vouchers are generated. Do not reset or reuse a live sequence without checking previously issued codes.
Available PDF merge tags
The voucher email and PDF data support:
{{order_id}}{{order_date}}{{product_id}}{{product_slug}}{{product_name}}{{product_quantity}}{{voucher_id}}{{voucher_from}}{{voucher_receiver_name}}{{voucher_to}}{{voucher_message}}{{voucher_correlative_number}}{{voucher_expiration_date}}
Design for long names, multi-line messages, accented characters, and a quantity greater than one.
Configure a voucher product
- Edit the WooCommerce product.
- Open the Gift voucher product-data tab.
- enable Generate gift voucher;
- enter PDF name;
- choose PDF template;
- choose PDF format: A4, A4 landscape, or Square;
- set an Expiration number and choose days, months, or years;
- update the product.
A voucher product without a valid positive expiration number and period cannot be added to the cart.
Customer fields and quantity
The product page requires:
- Your name;
- Name of the recipient;
- Email of the recipient;
- Contact number of the recipient when the global phone option is enabled.
Message is optional and limited to 500 characters.
WooCommerce's normal quantity control determines {{product_quantity}}. One eligible order line creates one voucher record, even when that line has a quantity greater than one. Enable WooCommerce's Sold individually option when a product must always represent one unit.
Generation and recovery
Voucher generation is tied to qualifying order payment/status processing and avoids creating a second voucher for an order line that already has one.
If a paid order is missing an eligible voucher:
- open the order;
- select Generate missing gift vouchers in Order actions;
- apply the action;
- confirm the order note and voucher;
- verify the recipient email and PDF.
Use the recovery action only for missing eligible lines. It is designed to leave existing line vouchers unchanged.
Verification
- Buy a voucher with quantity one.
- Repeat with a supported quantity greater than one.
- Confirm that adding the voucher to another cart clears the previous contents with a notice.
- Confirm validation for missing names, invalid email, required phone, and missing expiry.
- Move the order through the store's real paid-order flow.
- Verify code, recipient, product, quantity, expiry, PDF format, and every merge tag.
- Confirm unpaid orders do not yield a usable voucher.
- Run the missing-voucher recovery and confirm that it does not duplicate an existing line voucher.
- Print the PDF and review the email on a phone.