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 > WooCommerce PDF Invoices, Packing Slips, Delivery Notes and Shipping Labels > How to add product attribute as a new column in the product table of an invoice

How to add product attribute as a new column in the product table of an invoice

Last updated on July 17, 2023

Including a clear description of the product or service offered by a WooCommerce store is a trivial part of invoicing. An invoice would need to include product-specific attributes such as color, weight, and quantity. In fact, they best describe a product. This can be achieved using the plugins Customization option. New attributes are added from the Add new column dialogue box using Filters.

Prerequisite

Steps to add a product attribute as new column to an Invoice

Implement the following steps to add a new column to the product table of an invoice.

  1. Click on Invoices/Packing > Invoices in the WordPress dashboard to reach the WooCommerce PDF Invoices, Packing Slips, Delivery Notes & Shipping Labels settings.
  2. Click on the Customize tab. This displays the default template of the Invoice.
  3. In the Customization window,move to the Product table in the Preview Pane and select it. This will display the Settings of the product table in the Editor Pane.
  4. Click on the “+” Icon in the top-right corner of the Editor pane. This displays the Add new column dialogue box.
  5. In the Dialogue box that appears, enter the name of the new column in the Column header text box.
  6. We can add product attributes as new columns to the product table using Filter. In the Select a value list box, select the Filter option. This option adds custom values to the product table. We use column keys to identify the column on the filter.

In the following example, we display the product attribute – color using Filter. Here, attribute is the column key.  The values are entered as shown in the image below.

Dialogue box to add color as a new attribute to the invoice.
Color attribute added as a new column

Add the following code to the function.php file to create a sample filter that gets the color value.

Sample Invoice pdf after adding a new column using filters is as follows:

Sample invoice showing the color attribute added through customizer
Sample invoice showing the color attribute added through customizer