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 > Predefined Filters for WooCommerce Invoices, Packing Slips and Credit Notes

Predefined Filters for WooCommerce Invoices, Packing Slips and Credit Notes

Last updated on February 17, 2025

In WooCommerce, predefined filters allow store owners to customize and extend the functionality of their order documents, such as invoices, packing slips, and credit notes. These filters enable businesses to customize documents according to their precise requirements to increase efficiency and customer satisfaction. The Help Guide tab of WooCommerce PDF Invoices, Packing Slips, and Credit Notes plugin provides many filters that can extend the plugin’s functionality. Filters can be found by navigating to Invoice/ Packing > General Settings > Help Guide >Filters.

You can add a filter as a custom code snippet to your WordPress site. Add it to the active child theme’s functions.php file, or use a third-party plugin for the addition. For more details, check out the following article: Adding Custom Codes with a Third-Party Plugin.

Filters section
Filters section

Filter to show/hide the ‘Received’ seal

The filter wf_pklist_toggle_received_seal can be used to hide the received seal in the invoice for refunded orders.

  • Scroll down the page and locate the filter.
  • Then, expand the code and copy the code as shown below:
  • Next, paste the code into the functions.php of the active theme file.

Filter to show the ‘Received’ seal only for completed orders

Add the custom code snippet to print the Received seal for the completed order status. Add it to the active child theme’s functions.php file or use a third-party plugin for the addition. To learn more, check out the following article: Adding Custom Codes with a Third-Party Plugin.

add_filter('wf_pklist_toggle_received_seal','wf_pklist_toggle_received_seal_fn', 10, 3);
function wf_pklist_toggle_received_seal_fn($is_enable_received_seal, $template_type, $order)
{
	return ($order->get_status()=='completed');
}

Note: The Payment received stamp must be enabled in the active template. You can edit that received text to “Paid”, which is located in the customize tab.

Filter to show the ‘Canceled’ seal for canceled orders

Before adding the code snippet, navigate to Invoice/Packing > Invoice > Customize.

Find the Payment received stamp element from the editor pane of the template.

Remove the text inside the Payment received stamp.

Payment received stamp text removed
Payment received stamp text removed

Add the code snippet to show the ‘Canceled seal’ for canceled orders and the ‘Received seal’ for completed orders. Add it to the active child theme’s functions.php file, or use a third-party plugin for the addition. To learn more, check out the following article: Adding Custom Codes with a Third-Party Plugin.