Cyber Monday
  • Days
  • Hrs
  • Mins
  • Secs
50% Off

Get coupon code 'BFCM5024' Limited Offer!!

Star

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 September 19, 2024

Note: This article applies to the following document types:

  • Invoice
  • Packing Slip
  • Dispatch Label
  • Delivery Note
  • Picklist
  • Proforma Invoice

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. Modify the code snippet below with the required product meta.
  2. Add the updated custom code snippet to the WordPress site.

Removing unnecessary product metadata

Below are the detailed steps for the same:

Step 1: Modify the custom code snippet

  1. In the custom code snippet given below, replace the default meta keys Productmeta1 and Productmeta2 with the product meta to be removed. While replacing, make sure to add the correct field name of the meta (here, ‘Size’ and ‘Color’ are to be removed. So replace Productmeta1 and Productmeta2 with ‘Size’ and ‘Color’ respectively).

The image below shows documents before adding the code snippet. All these documents have two product metas: Size and Color.

Step 2: Add the updated custom code snippet

  1. Add the custom code snippet to your WordPress site. 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. For more details on adding custom code snippets using a third-party plugin, check out the following article: Adding Custom Codes with a Third-Party Plugin.

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