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 topHooks 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 topActions 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 topFilters 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 topAdding 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 topDo 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.