Advanced Order Export for WooCommerce

PDF Product Vouchers

Selling gift vouchers? Need to export voucher numbers, values, and recipient details?

Standard WooCommerce exports only show the product name. Not the actual voucher info.

Here’s how to pull everything from PDF Product Vouchers plugin.

What this code exports

Adds six new columns to your product export:

  • Voucher Number
  • Voucher Value
  • Voucher Value (+Tax)
  • Recipient Name
  • Message
  • Voucher Expiration Date

The complete code

Setup steps

  1. Copy the entire code block
  2. Paste into your theme’s functions.php
  3. Go to Advanced Order Export for WooCommerce
  4. Create or edit an export profile
  5. Open Setup Fields → Products
  6. You’ll see six new voucher fields. Check the ones you need
  7. Save and run a test export

What your export looks like

OrderProductVoucher NumberVoucher ValueRecipient NameMessageExpiration Date
#1001Gift CardVC-1234-ABCD$50.00Sarah JohnsonHappy Birthday!2026-12-31
#1002Gift CardVC-5678-EFGH$100.00Mike ChenCongrats!2026-12-31

When you need this

You sell gift vouchers. Need to track which voucher number went to which customer.

Your accounting team needs voucher values with and without tax.

You offer personalized messages. Need to verify content before printing.

You manage expiration dates. Need to report on soon-to-expire vouchers.

Common mistake

The code expects the PDF Product Vouchers plugin to be active. Function wc_pdf_product_vouchers_get_voucher() must exist.

No voucher data? Check that vouchers were actually generated. Sometimes vouchers create after payment completes.

Empty columns?

Three things to verify:

  1. Is PDF Product Vouchers installed and active?
  2. Does the order contain a voucher product?
  3. Has the voucher been generated (not just added to cart)?

Run a test order. Buy a voucher. Complete checkout. Then export.

Pro tip

Need only vouchers in your export? Filter by product type. Exclude regular products.

Add the Expiration Date column. Sort by it. See which vouchers expire soon.

Real talk

PDF Product Vouchers stores voucher data in a custom post type. Not in standard order item meta.

This code finds the voucher ID from order item meta. Then loads the full voucher object. Then pulls each field.

Works with both free and Pro versions of PDF Product Vouchers.

Your gift card team finally gets all voucher details in one export. No more manual lookups.

Have questions? Please submit a support request. We're always happy to help!

Advanced Order Export
for WooCommerce
PRO

From $30
Buy
✓ 30-day money-back guarantee