WooCommerce ships with over 2,500 hooks – actions and filters scattered across templates, classes, and APIs. Finding the right hook for your customization is the hardest part of WooCommerce development. The interactive map above shows every template hook visually for each WooCommerce page.
What Are WooCommerce Hooks
Hooks are predefined points in WooCommerce’s code where you can inject your own functionality. There are two types:
- Action hooks let you add content or run code at a specific point. WooCommerce calls
do_action(), and your function runs. - Filter hooks let you modify data before WooCommerce uses it. WooCommerce passes data through
apply_filters(), and your function changes it and returns the result.
If you are new to WooCommerce hooks, start with my complete guide to WooCommerce hooks for a deeper introduction. The syntax is straightforward:
// Action: add content after the product price
add_action( 'woocommerce_single_product_summary', 'my_custom_content', 15 );
function my_custom_content() {
echo '<p>Custom content here</p>';
}
// Filter: modify the product tabs array
add_filter( 'woocommerce_product_tabs', 'my_custom_tabs' );
function my_custom_tabs( $tabs ) {
unset( $tabs['reviews'] );
return $tabs;
}The third parameter in add_action() is the priority. Lower numbers run first. WooCommerce uses increments of 5 or 10 for its default callbacks, leaving room for your code to slot in between.
How to Find WooCommerce Hooks
Three practical methods for discovering hooks on any WooCommerce page:
1. The wc-template-hooks.php File
This single file inside WooCommerce’s includes/ directory registers all 73 template hook callbacks. It is the source of truth for what WooCommerce attaches to each hook by default and at which priority.
wp-content/plugins/woocommerce/includes/wc-template-hooks.phpOpen it and search for the hook you need. Every add_action() and add_filter() call shows you exactly what WooCommerce does with each hook.
2. Query Monitor Plugin
Install Query Monitor and visit any WooCommerce page. The Hooks and Actions panel shows every hook that fired during that page load, in execution order, with the callbacks attached and their priorities.
3. The Interactive Map Above
I built the visual map at the top of this page to solve this problem. Each WooCommerce page template is represented as a wireframe with hooks placed exactly where they fire in the rendering flow.
Hook Execution Order and Priorities
Every hook in WooCommerce fires at a specific priority. WooCommerce’s default callbacks typically use priorities 5, 10, 20, 30, 40, and 50. Your custom code slots in between based on the priority you set.
Here is the single product page as an example. The woocommerce_single_product_summary hook is a container where WooCommerce attaches multiple callbacks at different priorities:
| Priority | Callback | Output |
|---|---|---|
| 5 | woocommerce_template_single_title | Product title |
| 10 | woocommerce_template_single_rating | Star rating |
| 10 | woocommerce_template_single_price | Price |
| 20 | woocommerce_template_single_excerpt | Short description |
| 30 | woocommerce_template_single_add_to_cart | Add to cart button |
| 40 | woocommerce_template_single_meta | SKU, categories, tags |
| 50 | woocommerce_template_single_sharing | Social sharing buttons |
To add custom content between the price and the short description, use priority 15:
add_action( 'woocommerce_single_product_summary', 'my_custom_text_after_price', 15 );
function my_custom_text_after_price() {
echo '<p class="custom-notice">Free shipping on orders over $50</p>';
}To remove a default element, use remove_action() with the exact same function name and priority:
// Remove the product meta (SKU, categories, tags)
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 );remove_action() or remove_filter() with the exact priority that WooCommerce used when attaching the callback. If the priority does not match, the removal will silently fail.WooCommerce Hooks and Block Checkout
WooCommerce is migrating its cart and checkout pages to a block-based architecture. This creates two parallel systems that developers need to understand.
Adoption [of block checkout] is lower than expected – WooCommerce Team, April 2025
As of early 2026, approximately 87% of WooCommerce stores still use the classic shortcode-based checkout. Only 35 classic hooks have been officially migrated to work with the block checkout – 24 filters and 11 actions.
The classic PHP hooks simply do not fire when the block-based checkout renders. WooCommerce provides three paths for block-based customization:
- Migrated hooks – 35 hooks that work in both classic and block contexts (shipping and tax calculation hooks, billing/shipping form hooks).
- Checkout Extensibility API – JavaScript-based filters and Slot/Fill components for the block checkout. Requires webpack and React knowledge.
- Additional Checkout Fields API – Introduced in WooCommerce 8.6+, replaces the
woocommerce_checkout_fieldsfilter for adding custom fields in block checkout.
For now, I recommend targeting classic hooks for most projects. When block checkout adoption increases, I will update this guide with a dedicated block hooks tab.
Common Tasks – Which Hook to Use
Instead of searching through hook names, find the task you need and use the recommended hook:
| I Want To… | Hook | Type |
|---|---|---|
| Add content above the product | woocommerce_before_single_product | Action |
| Move or remove the product price | woocommerce_single_product_summary | Action (priority 10) |
| Add a custom product tab | woocommerce_product_tabs | Filter |
| Change the Add to Cart button text | woocommerce_product_single_add_to_cart_text | Filter |
| Add a custom checkout field | woocommerce_checkout_fields | Filter |
| Add content before the Place Order button | woocommerce_review_order_before_submit | Action |
| Add a fee to the cart | woocommerce_cart_calculate_fees | Action |
| Modify the cart totals display | woocommerce_cart_totals_before_order_total | Action |
| Add a custom My Account tab | woocommerce_account_menu_items | Filter |
| Run code after an order is placed | woocommerce_thankyou | Action |
| Modify product price display | woocommerce_get_price_html | Filter |
| Add content to the shop loop | woocommerce_after_shop_loop_item_title | Action |
| Dequeue WooCommerce CSS/JS on non-shop pages | wp_enqueue_scripts | Action |
| Add custom fields to products | woocommerce_product_options_general_product_data | Action |
| Prevent loading WooCommerce assets | wp_enqueue_scripts | Action |
FAQs
Common questions about WooCommerce hooks:
wc-template-hooks.php file alone registers 73 template hook callbacks - 67 actions and 6 filters.add_action() and filters use add_filter(). The key difference: filters must return a value, actions do not.wc-template-hooks.php in the WooCommerce plugin directory to see all default hook registrations and their priorities.add_action() or add_filter(). Lower numbers run first. WooCommerce uses increments of 5 or 10 for its defaults (e.g., title at 5, price at 10, add-to-cart at 30). To place your code between two defaults, pick a priority value between them.functions.php. For anything beyond a few hooks, create a site-specific plugin. This keeps customizations independent of the theme. Never edit WooCommerce core files directly.Summary
WooCommerce’s 2,500+ hooks give you complete control over every page, but only if you know which hook to use and where it fires. This visual map covers the five main WooCommerce templates: single product, shop archive, cart, checkout, and my account. Each hook is placed exactly where it executes in the rendering flow, with its type, priority, and default callbacks visible on click.
Use the interactive map as your reference when building WooCommerce customizations. Bookmark this page – I will keep it updated as WooCommerce evolves its hook system, especially as block-based checkout adoption grows.

