Home>Docs>WooCommerce PDF Invoices, Packing Slips and Credit Notes Plugin>Removing Product Meta from WooCommerce Invoices and Other Document Types

Removing Product Meta from WooCommerce Invoices and Other Document Types

Last updated on April 12, 2024

Store owners can remove unnecessary product metadata from the product table of documents using a custom code snippet. This custom code snippet works on all the document types with a product table. To achieve this, follow the below steps:

  1. Update the custom code snippet with the required product meta to be removed.
  2. Add the updated custom code snippet to the WordPress site in use.

Removing product metadata

Follow the below steps to accomplish this:

  1. Replace Productmeta1 and Productmeta2 in the custom code snippet with the preferred product meta to be removed. While replacing make sure to add the correct field name of the meta (Here, let’s take an example of removing ‘Size’ and ‘Color’ from the product table. So we should replace Productmeta1 and Productmeta2 with ‘Size’ and ‘Color’ respectively).

The image below shows documents with product meta ‘Size’ and ‘Color’ in it.

  1. Add the custom code snippet to the WordPress site in use. Store owners can add the custom code snippet to the active child theme’s functions.php file, or use a third-party plugin for the addition. To know more about how to add a custom code snippet using a third-party plugin, refer to this article.

On removing the unnecessary product meta, the documents will look like this: