Since 28th December 2022, this plugin version has been discontinued for purchase. However, support will be continued for existing users. Post the aforementioned date, users who purchase the plugin, which now is made available as multiple add-ons, must refer to their corresponding setup guides. The drag-and-drop customizer feature is now available for purchase as an add-on.

WooCommerce PDF Invoices, packing slips and credit notes plugin | WooCommerce Shipping labels, Dispatch labels and Delivery notes plugin | WooCommerce Address labels plugin | WooCommerce Picklists plugin | WooCommerce Proforma invoices plugin | Customizer for WooCommerce PDF Invoices

Since 28th December 2022, this plugin version has been discontinued for purchase. However, support will be continued for existing users.

Home > Docs > How to add meta fields to WooCommerce PDF Invoices

How to add meta fields to WooCommerce PDF Invoices

Last updated on January 23, 2023

Adding custom fields to WooCommerce invoices might seem like a lot of customization and editing work. But, WebToffee’s PDF Invoice and Packing Slip plugin for WooCommerce makes the process a whole lot easier.

Let’s take a look at the steps for adding custom fields to WooCommerce invoices.

  • Install PDF Invoice/Packing plugin for WooCommerce on your site.
  • Go to WooCommerce > Invoice/ Packing > Invoice from WordPress dashboard.
  • You can add metadata in two ways:
    1. Invoice Settings > Customizer. To add metadata from the customizer.
    2. Invoice Settings > Advanced tab.

Advanced settings

From the invoice settings window, move on to the Advanced tab. You can add:

  • Order meta
  • Product meta
  • Product attribute

Add order meta

The plugin allows adding additional order information like Delivery date, Payment date, Place of supply, VAT, GSTIN, ABN, etc., or any other company tax ID as order meta in the invoice. You can add order meta in two ways:

Method 1: Select a required item from the Order meta field drop-down. The list of default order metadata populated in the drop-down are as shown below:

WooCommerce Invoice/Pack Slip-Invoice Advanced-Order meta fields

Method 2: To add other custom order meta details (probably from another third-party plugin) other than the ones displayed in the drop-down,

  1. Click on Add/Edit Order Meta Field.
  2. Into the popup that appears, from Add New tab section, key in custom Field Name and its corresponding Meta Key.
  3. Then, click on the Save button.

For example, to add a custom VAT number in the invoice populated from the plugin EU VAT Number for WooCommerce, you will have to key in an appropriate field name and its corresponding meta key in the checkout meta key fetcher pop up as shown below:

Adding custom order meta in WooCommerce invoice

Get the meta key for the VAT Number (_vat_value) from the respective plugin’s documentation.

Sample invoice with the VAT

The invoice with its order meta EU VAT Number will be as shown below:

The invoice with order meta-VAT

Add product meta

From Product meta fields,

  • Click the Add/Edit Product Meta button.
  • Into the popup that appears, key in with field name and the respective meta key.
  • Then, click on the Save button.

For example, the WooCommerce product meta for weight is ‘_weight’. Let us see how we can display it in our invoice.

Insert the field name and meta key in the following manner:

A sample invoice with a product metadata Weight will be as shown below:

Add product attribute

  1. From the product attribute, click the Add/Edit Product Attribute button.
  2. Into the popup that appears, from Add New tab section, key in with field name and the respective meta key.
  3. Then, click on the Save button.

For example, let’s create a custom product attribute for a product. Go to Products from your WordPress dashboard. From the product data panel, move on to the Attributes section.

The string entered for the field ‘Name‘ must be added as the Meta Key in the invoice settings. Upon adding the attribute, the screen will be as shown below:

A sample invoice with product attribute will be as shown below:

Related articles: