Start a free 14-day trial by December 1 on a wide range of WooCommerce Marketplace extensions and themes. Explore products

Hooks, actions and filters

Hooks let you change WooCommerce behavior without editing core code. This guide explains action and filter hooks.

Note: This document is meant to serve as a helpful guide for advanced troubleshooting; however, the procedures described are beyond the scope of our support policy and we cannot provide direct assistance with implementing them. 

If you would like to seek assistance from a qualified WordPress/WooCommerce developer, we highly recommend Codeable or a Woo Agency Partner. 

What are hooks?

↑ Back to top

Hooks are points in WordPress and WooCommerce where custom code can interact with the software. Actions and filters are two types of hooks.

What are actions?

↑ Back to top

Actions let custom code run when a particular event occurs or a page reaches a particular point. For example, an action can add a message to a cart page.

What are filters?

↑ Back to top

Filters let custom code change a value before it is used or displayed. For example, a filter can change the text of a sale badge.

Using actions and filters

↑ Back to top

Adding actions and filters requires knowledge of PHP and WooCommerce. Developers can use the action and filter examples to get started.

Questions and support

↑ Back to top

Do you still have questions and need assistance? 

  • Get in touch with a Happiness Engineer via our Help Desk. We provide support for extensions developed by and/or sold on WooCommerce.com, and Jetpack/WordPress.com customers.
  • If you are not a customer, we recommend finding help in the WooCommerce support forum or hiring a Woo Agency Partner. These are trusted agencies with a proven track record of building highly customized, scalable online stores. Learn more about Woo Agency Partners.
Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.