How to Add Custom Fields to WooCommerce PDF Invoices

Last updated
Read time
7 min
How to Add Custom Fields to WooCommerce PDF Invoices

To add custom fields to a WooCommerce PDF invoice, install an invoicing plugin such as Challan, then use its Add Order Meta, Add Product Meta, or Add Order Item Meta options to pull in extra order and product data, choosing exactly where each field appears on the invoice. 

This guide walks through the free version’s field options first, then the additional controls available in Challan Pro, along with a few practical examples like adding fields to order emails or showing different invoice text for specific countries.

How to Add Custom Fields to WooCommerce PDF Invoices Using Challan

Challan generates a PDF invoice automatically for every WooCommerce order and gives you a dedicated settings screen to control exactly which data appears on it. Here’s the full process, from installing the plugin to adding your first custom field.

Step 1: Install and Activate Challan

Go to your WordPress admin dashboard, then Plugins > Add New. Search for “Challan,” install it, and activate it. Once active, Challan generates an invoice for every new order automatically. Customers can download it from the order confirmation page or their My Account page, and you can download it manually from any order’s detail page in WooCommerce > Orders, where a new “Challan Invoice” section appears with buttons for the invoice, packing slip, and shipping label.

Step 2: Enable Currency Code and Payment Method

Open Challan’s settings page. Scroll to find the toggle for currency code and turn it on to show codes like USD or EUR on every invoice. A little further down, in the order settings, you’ll find a similar toggle for displaying the payment method used for the order.

Step 3: Add Order Meta Custom Fields

This is where most of the customization happens. Click Add Order Meta, then fill in three fields: a name for your custom field, the placement, and the data source.

Placement options include:

  • After order data
  • Before order data
  • Before billing address
  • After billing address
  • Before shipping address
  • After shipping address

The data source dropdown lets you pick from WooCommerce’s order-level fields, including:

billing_address_1, billing_city, billing_country, billing_email, billing_first_name, billing_last_name, billing_phone, billing_postcode, billing_state, cart_discount, cart_discount_tax, cart_hash, created_via, customer_ip_address, customer_user, customer_user_agent, order_currency, order_key, order_shipping, order_shipping_tax, order_tax, order_total, payment_method, payment_method_title, is_vat_exempt, and several others.

For example, to display the customer’s IP address before the billing address, name the field “Customer’s IP,” select customer_ip_address as the source, and choose “Before billing address” as the placement. Save, and the invoice now shows that IP address next to the billing details, useful evidence if a customer later disputes an order. The exact list of available fields can vary slightly by plugin version, so check the dropdown in your own settings panel for the current full list.

Step 4: Add Product Meta Custom Fields

Scroll to the product settings section and click Add Product Meta to pull extra product attributes into the invoice’s product table. Available options include _sku, _price, regular_price, sale_price, _weight, _height, _length, _width, product_attributes, _stock, stock_status, and more.

For example, adding _height as a product meta field displays each product’s height directly in the invoice’s product table.

Step 5: Add Order Item Meta Custom Fields

Order item meta fields pull data from the specific line item rather than the whole order. Available fields include product_id, variation_id, _qty, line_subtotal, line_subtotal_tax, line_total, and line_tax. Adding product_id, for instance, displays each product’s ID next to it in the invoice’s product table.

Step 6: Display Customer Notes

In the order settings, enable the option to show customer notes. Any note a customer leaves at checkout then appears directly on the generated invoice.

Adding Multiple Custom Fields with Challan Pro

Challan Pro replaces the single settings page with a dedicated panel for each document type (invoice, packing slip, shipping label) and removes the one-field-per-section limit of the free version.

Add Multiple Fields Per Section

In the free version, you can only add one field in the Add Product Meta section at a time. In Challan Pro, you can stack several. For example, you can display product height, width, and weight together in the same invoice, instead of choosing just one.

Built-In Pro Custom Fields

Challan Pro also ships with several custom fields built directly into its settings, rather than requiring a manual meta-field lookup:

  • Paid stamp: choose from pre-made stamp designs or upload your own
  • Authorized signature: upload an image to display as a signature
  • Order status and notes: shown alongside custom invoice number prefixes and suffixes
  • Product images and descriptions: short or long descriptions, plus product category and attributes like color and size
  • Tax, VAT, and bank details: toggle these on directly without configuring a meta field manually
  • Discount amount: displayed automatically when applicable

Practical Custom Field Examples for WooCommerce Invoices

A few specific setups come up often enough that they’re worth walking through directly, since each solves a distinct, common request.

Add a Custom Field to the Order Confirmation Email

Challan attaches the generated invoice to WooCommerce’s order confirmation email automatically, so any custom field you add to the invoice using the steps above (order meta, product meta, or order item meta) appears in the email attachment without any extra setup. There’s no separate “email custom field” setting. It’s the same invoice, just delivered by email instead of downloaded manually.

Add a Custom Shipping or Billing Field

To surface a specific shipping or billing detail that isn’t shown by default, use Add Order Meta and choose a field like shipping_address_index or one of the billing fields (billing_phone, billing_state, and so on), then set the placement to before or after the corresponding address block.

Add a VAT or Tax Number Field

For stores that need to display a VAT number, use the is_vat_exempt field in the free version, or enable the built-in tax and VAT toggle in Challan Pro for more complete tax detail display without a manual field lookup.

Show Different Invoice Text for Specific Countries

Challan’s settings don’t include a built-in “show this text only for country X” toggle. The practical way to handle this is to use billing_country as an Add Order Meta field so the country appears clearly on the invoice, and pair it with your own store policy (for example, a specific tax disclosure required only for US orders) added as a static custom field or note. For fully conditional, code-based logic (showing one note for US orders and a different one for all other countries), that requires a small custom filter using Challan’s hooks, which is worth a support request if you’re not comfortable editing template files directly.

Best WooCommerce Invoicing Plugin for Custom Fields: Challan

Challan is built by WebAppick, the team behind CTX Feed, and handles PDF invoices, packing slips, shipping labels, and credit notes for WooCommerce stores. It’s a fitting choice for custom fields specifically because both order-level and product-level meta can be added through its settings screen without touching code.

Key Features

  • Generates and attaches WooCommerce invoices to order confirmation emails automatically
  • Also generates packing slips, shipping labels, and credit notes
  • Supports adding order meta, product meta, and order item meta as custom fields
  • Pro version supports multiple custom fields per section, plus built-in stamps, signatures, and tax/VAT display
  • Customizable invoice template, including CSS-level control
  • Bulk download for invoices and packing slips

Pricing starts from around $69 per year for a single site, with five-site and ten-site annual plans and lifetime license options also available. Check the official Challan pricing page before publishing, since plans and rates can change.

Frequently Asked Questions

What is a custom field in a WooCommerce invoice?

A custom field is any piece of order, product, or customer data added to an invoice beyond the standard invoice elements, like customer’s IP address, VAT number, or a specific product attribute. WooCommerce stores this data at the time of purchase; a plugin like Challan displays it on the invoice.

How do I add a custom field to a WooCommerce invoice?

WooCommerce doesn’t generate invoices on its own, so you’ll need a plugin like Challan. Once installed, use the Add Order Meta, Add Product Meta, or Add Order Item Meta options in its settings to select which field to display and where it appears on the invoice.

Can I add custom fields to WooCommerce order confirmation emails?

Yes, indirectly. Challan attaches the generated PDF invoice to the order confirmation email automatically, so any custom field added to the invoice also appears in the emailed version. There’s no separate email-only field setting.

Can I display custom fields on the WooCommerce order admin page instead of the invoice?

Challan’s custom field options are built for the invoice, packing slip, and shipping label documents, not the WooCommerce order edit screen itself. To show custom meta directly on the admin order page, you’d need a separate plugin or a small code snippet targeting the order edit screen.

Can I show different invoice content for specific countries, like the US?

Not as a built-in toggle. You can display billing_country as a custom field so the country is visible on the invoice, but showing genuinely different text per country requires a custom filter using Challan’s hooks rather than a settings-page option.

Key Takeaways

  • Challan’s Add Order Meta, Add Product Meta, and Add Order Item Meta settings cover most custom field needs on WooCommerce invoices without code.
  • The free version allows one custom field per section; Challan Pro removes that limit and adds built-in options for stamps, signatures, and tax details.
  • Custom fields added to the invoice automatically appear in the emailed version too, since Challan attaches the same PDF to order confirmation emails.
  • Common fields worth adding include is_vat_exempt for tax compliance, billing_country for region-specific handling, and product attributes like _sku or _weight for fulfillment.
  • Fully conditional invoice text, like different wording for US orders, needs a custom filter rather than a settings toggle.
[CTA] Stop reading. Start fixing.
Fix your product feed with CTX Feed Pro.

Free version on WordPress.org. Every Pro licence includes a 30-day money-back guarantee.

[0] Comments
Join the discussion
Leave a comment →

Leave a comment.

[NEWSLETTER] Field Notes, monthly

One email a month.
Zero fluff.

Channel-spec changes, plugin releases, the occasional deep dive on something we broke.