Discount Sale
  • Days
  • Hrs
  • Mins
  • Secs
30% Off

Use coupon code 'MDS30' Limited Offer!!

Star

Home > Docs > WooCommerce PDF Invoices, Packing Slips and Credit Notes Plugin > Sorting WooCommerce Packing Slips by Category and Product Name

Sorting WooCommerce Packing Slips by Category and Product Name

Last updated on February 10, 2025

Sorting items in a packing slip is vital for efficient and error-free order fulfillment. WebToffee’s WooCommerce PDF Invoices, Packing Slips, and Credit Notes plugin helps sort items in a packing slip by category and product name. To implement this, add the custom code snippet to the WordPress site and enable the Group products by ‘Category’ option.

Step 1: Adding the custom code snippet

Add the custom code snippet below to the WordPress site. To do this, add the custom code snippet to the active child theme’s functions.php file or use a third-party plugin. 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.

The custom code snippet is given below.

Step 2: Enabling the Group products by ‘Category’ option

Follow these basic steps to enable the Group products by ‘Category’ option.

  1. From the WordPress dashboard, navigate to Invoice/Packing slip > Packing slip.
  2. Under the General tab, navigate to the Product display section.
  3. Tick the checkbox against the Group products by ‘Category’ option to enable it, as shown below.
Enabling Group products by 'Category' option
Enabling Group products by ‘Category’ option
  1. As a final step, click on Update settings and save the changes.
Update Settings
Update Settings

The plugin will automatically sort the products in a WooCommerce packing slip based on the category and product name.

The following image displays a packing slip sorted by category and product name in ascending order.

WooCommerce Packing slip with sorted items
WooCommerce Packing slip with sorted items