WooCommerce Hooks - Interactive Visual Map
Click any hook to see type, priority, callbacks, and code snippet
Choose a page
Action Filter Hover to focus · click for code
V-Neck T-Shirt
★★★★☆ (12 customer reviews)
$15.00 $20.00
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
SKU: woo-vneck-tee
Category: Tshirts
Tags: clothing, tshirt
Product Data Tabs
Description
Additional information
Reviews (12)
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante.
Upsell Products
Hoodie
$45.00
Long Sleeve
$25.00
Polo
$20.00
Cap
$18.00
Related Products
Beanie
$20.00
Belt
$55.00
Sunglasses
$90.00
Album
$15.00
Home / Shop / T-Shirts
Browse our collection of premium t-shirts and apparel.
Showing 1–12 of 36 results Default sorting ▾
V-Neck T-Shirt
★★★★☆
$15.00
Hoodie
$45.00
(same hooks repeat)
Long Sleeve Tee
$25.00
(same hooks repeat)
1 2 3 ... 6
×ProductPriceQuantitySubtotal
×V-Neck Tee$18.00$18.00
×Hoodie$45.00$45.00
Cross-sells
Beanie
$20.00
Belt
$55.00
Cart Totals
Subtotal$63.00
ShippingFlat rate: $5.00
Total$68.00
Returning customer? Click here to login  |  Have a coupon? Click here to enter your code
Billing details
First name *
Last name *
Company name (optional)
Country / Region *
United States ▾
Street address *
Town / City *
State *
California ▾
ZIP Code *
Phone *
Email address *
Ship to a different address?
Order notes (optional)
Notes about your order...
Your order
ProductSubtotal
V-Neck Tee × 1$18.00
Hoodie × 1$45.00
Subtotal$63.00
ShippingFlat rate: $5.00
Total$68.00
Direct bank transfer
Check payments
Cash on delivery
I have read and agree to the website terms and conditions *
search

WooCommerce Hooks: Interactive Visual Guide for Every Page

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.php

Open 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:

PriorityCallbackOutput
5woocommerce_template_single_titleProduct title
10woocommerce_template_single_ratingStar rating
10woocommerce_template_single_pricePrice
20woocommerce_template_single_excerptShort description
30woocommerce_template_single_add_to_cartAdd to cart button
40woocommerce_template_single_metaSKU, categories, tags
50woocommerce_template_single_sharingSocial 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 );
Always use 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:

  1. Migrated hooks – 35 hooks that work in both classic and block contexts (shipping and tax calculation hooks, billing/shipping form hooks).
  2. Checkout Extensibility API – JavaScript-based filters and Slot/Fill components for the block checkout. Requires webpack and React knowledge.
  3. Additional Checkout Fields API – Introduced in WooCommerce 8.6+, replaces the woocommerce_checkout_fields filter 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…HookType
Add content above the productwoocommerce_before_single_productAction
Move or remove the product pricewoocommerce_single_product_summaryAction (priority 10)
Add a custom product tabwoocommerce_product_tabsFilter
Change the Add to Cart button textwoocommerce_product_single_add_to_cart_textFilter
Add a custom checkout fieldwoocommerce_checkout_fieldsFilter
Add content before the Place Order buttonwoocommerce_review_order_before_submitAction
Add a fee to the cartwoocommerce_cart_calculate_feesAction
Modify the cart totals displaywoocommerce_cart_totals_before_order_totalAction
Add a custom My Account tabwoocommerce_account_menu_itemsFilter
Run code after an order is placedwoocommerce_thankyouAction
Modify product price displaywoocommerce_get_price_htmlFilter
Add content to the shop loopwoocommerce_after_shop_loop_item_titleAction
Dequeue WooCommerce CSS/JS on non-shop pageswp_enqueue_scriptsAction
Add custom fields to productswoocommerce_product_options_general_product_dataAction
Prevent loading WooCommerce assetswp_enqueue_scriptsAction

FAQs

Common questions about WooCommerce hooks:

How many hooks does WooCommerce have?
WooCommerce has over 2,500 hooks (actions and filters) spread across templates, core classes, REST API endpoints, and admin screens. The wc-template-hooks.php file alone registers 73 template hook callbacks - 67 actions and 6 filters.
What is the difference between action hooks and filter hooks in WooCommerce?
Action hooks let you add code that runs at a specific point - such as outputting custom HTML after the product price. Filter hooks let you modify data before WooCommerce uses it - such as changing the product tabs array. Actions use add_action() and filters use add_filter(). The key difference: filters must return a value, actions do not.
How do I find which hooks fire on a specific WooCommerce page?
Three methods: (1) Use the interactive visual map in this guide. (2) Install the Query Monitor plugin and check the Hooks and Actions panel. (3) Open wc-template-hooks.php in the WooCommerce plugin directory to see all default hook registrations and their priorities.
Do WooCommerce hooks work with the block-based checkout?
Most classic PHP hooks do not fire in the block-based checkout. Only 35 hooks have been officially migrated to work in both contexts. For block checkout, WooCommerce recommends the Checkout Extensibility API or the Additional Checkout Fields API introduced in WooCommerce 8.6+. As of early 2026, approximately 87% of stores still use classic checkout.
How do I change the priority of a WooCommerce hook?
The priority is the third argument in 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.
Why is my WooCommerce hook not firing?
Common causes: (1) The hook is only available on classic checkout and you are using block checkout. (2) Your function is hooked at the wrong priority. (3) The hook has been removed by your theme or another plugin. (4) Your code is in a file that is not loaded on the relevant page. (5) A caching plugin is serving a stale version. Use Query Monitor to verify which hooks fire.
Where should I put my WooCommerce hook code?
For simple customizations, add hooks to your child theme's 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.

Join the Discussion
0 Comments  ]

Leave a Comment

To add code, use the buttons below. For instance, click the PHP button to insert PHP code within the shortcode. If you notice any typos, please let us know!

Savvy WordPress Development official logo