Inicio - Documentación - POM Theme - 10 WooCommerce - Configure gift vouchers

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

  1. Go to Settings → POM Theme → E-Commerce → Promotions → Gift vouchers settings.
  2. Enable the feature.
  3. Set Next voucher number.
  4. Set the optional Voucher prefix and Voucher suffix.
  5. Add at least one PDF template.
  6. Give the template a clear internal name.
  7. Write its header, body, and footer HTML.
  8. Enable Phone number only when recipient contact is genuinely required.
  9. Save the settings.

Gift voucher 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

  1. Edit the WooCommerce product.
  2. Open the Gift voucher product-data tab.
  3. enable Generate gift voucher;
  4. enter PDF name;
  5. choose PDF template;
  6. choose PDF format: A4, A4 landscape, or Square;
  7. set an Expiration number and choose days, months, or years;
  8. 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:

  1. open the order;
  2. select Generate missing gift vouchers in Order actions;
  3. apply the action;
  4. confirm the order note and voucher;
  5. 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

  1. Buy a voucher with quantity one.
  2. Repeat with a supported quantity greater than one.
  3. Confirm that adding the voucher to another cart clears the previous contents with a notice.
  4. Confirm validation for missing names, invalid email, required phone, and missing expiry.
  5. Move the order through the store's real paid-order flow.
  6. Verify code, recipient, product, quantity, expiry, PDF format, and every merge tag.
  7. Confirm unpaid orders do not yield a usable voucher.
  8. Run the missing-voucher recovery and confirm that it does not duplicate an existing line voucher.
  9. Print the PDF and review the email on a phone.

Related guides