Home > Docs > Add Order Meta to WooCommerce Invoices and Other WooCommerce Document Types

Add Order Meta to WooCommerce Invoices and Other WooCommerce Document Types

Last updated on April 12, 2024

WebToffee’s PDF Invoice, Packing Slip, and Credit Notes plugin allows adding custom order metadata to WooCommerce documents. Insert additional information about the delivery date, tracking, or payment info into the documents by adding a custom meta key.

  1. From the Dashboard, click Invoice/ Packing > Document type.
  2. The Order meta field is either available under the Advanced tab or the Advanced section in the General tab.
  3. In the Order meta fields options, Click on the Add/Edit order meta field.
  4. Key in the Field name and Meta Key.
  5. Click on Save to add the order meta.
Add order meta field – WooCommerce document types.
  1. Modify or delete existing order metadata from the Previously added tab.

Use case – Adding order metadata to an invoice

For instance, consider a scenario where you need to display a custom order field eh_alipay_intent_id in the invoice.

To add this metadata to your invoice, follow the steps below:

  1. Install PDF Invoices and Packing Slips plugin for WooCommerce on your store site.
  2. From the WordPress dashboard, go to the Invoice/ Packing > Invoice.
  3. Click on the Advanced tab.
  4. From the order meta field, click on the Add/Edit Order Meta Field button to add custom metadata. From the Add new tab, input in the Field Name: Payment_ID and the respective Meta Key: eh_alipay_intent_id.
Adding custom metadata
Adding custom metadata

A sample invoice with new order meta Payment_id is shown below:

Sample Invoice with order meta
Sample Invoice with order meta