This article was last manually reviewed for data accuracy on 14 November 2025.
WooCommerce single product page hooks provide powerful opportunities to customize and extend the product display without modifying core files.
You can use these hooks to insert content, modify layouts, and add functionality at precise points on the product page—whether before the product summary, in the add to cart area, or within product metadata.
This visual guide of WooCommerce Single Product Page Hooks and the detailed hook list will help you understand where each hook fires, what default functions they trigger, and how to leverage them effectively.
Whether you’re adding custom banners, tweaking product information, or personalizing the checkout experience, this reference will be an essential tool for you.
Visual Guide: WooCommerce Product Page Hooks

Complete List of WooCommerce Product Page Action Hooks
| Group & Location | Hook Name | Description & Usage | Default Functions |
|---|---|---|---|
| Page Wrappers | woocommerce_before_main_content | Fires before the main site content wrapper (<div id=”content”>). Good for breadcrumbs or notices. | woocommerce_output_content_wrapper() |
| woocommerce_after_main_content | Fires after the main site content wrapper closes. Useful for footer/sidebar injections. | woocommerce_output_content_wrapper_end() | |
| Product Container | woocommerce_before_single_product | Fires before the product’s primary container opens. | wc_print_notices() |
| woocommerce_after_single_product | Fires after the entire single product template closes. | (No defaults attached) | |
| Product Summary Area (Images & Title) | woocommerce_before_single_product_summary | Fires before the two-column structure (image/summary) begins. | woocommerce_show_product_sale_flash(), woocommerce_show_product_images() |
| woocommerce_product_thumbnails | Fires after the main product image, before thumbnails. | woocommerce_show_product_thumbnails() | |
| woocommerce_before_single_product_title | Fires just before the product title markup. | (None) | |
| woocommerce_after_single_product_title | Fires just after the product title markup. | (None) | |
| woocommerce_single_product_summary | Fires inside the product summary column (right side). Main content hook. | woocommerce_template_single_title(), woocommerce_template_single_rating(), woocommerce_template_single_price(), woocommerce_template_single_excerpt(), woocommerce_template_single_add_to_cart(), woocommerce_template_single_meta(), woocommerce_template_single_sharing() (deprecated) | |
| woocommerce_after_single_product_summary | Fires after the summary column closes, before tabs/upsells/related. | woocommerce_output_product_data_tabs(), woocommerce_upsell_display(), woocommerce_output_related_products() | |
| Add to Cart Flow | woocommerce_before_add_to_cart_form | Fires before the <form class=”cart”> tag. | (None) |
| woocommerce_before_variations_form | Fires before the variations form on variable products. | (None) | |
| woocommerce_before_add_to_cart_button | Fires inside the form, before the Add to Cart button. | (None) | |
| woocommerce_single_variation | Used for custom fields when a variation is selected. | (None) | |
| woocommerce_single_variation_add_to_cart_button | Fires around the variation quantity and button HTML. | woocommerce_single_variation_add_to_cart_button() | |
| woocommerce_after_add_to_cart_button | Fires inside the form, after the Add to Cart button. | (None) | |
| woocommerce_after_variations_form | Fires after the variations form on variable products. | (None) | |
| woocommerce_after_add_to_cart_form | Fires after the </form> tag closes. | (None) | |
| Product Meta & Sharing | woocommerce_product_meta_start | Fires at the start of SKU, categories, tags section. | (None) |
| woocommerce_product_meta_end | Fires at the end of SKU, categories, tags section. | (None) | |
| woocommerce_share | Deprecated. Used for social sharing buttons. | woocommerce_template_single_sharing() | |
| Reviews | woocommerce_review_before | Fires before any individual review block starts. | (None) |
| woocommerce_review_before_comment_meta | Fires before review author/date metadata. | (None) | |
| woocommerce_review_meta | Fires inside the review author/date metadata block. | (None) | |
| woocommerce_review_before_comment_text | Fires before the review text. | (None) | |
| woocommerce_review_comment_text | Fires inside the review text. | (None) | |
| woocommerce_review_after_comment_text | Fires after the review text. | (None) | |
| woocommerce_review_after | Fires after the review block closes. | (None) | |
| Template Part Wrappers | woocommerce_before_template_part | Fires before any WooCommerce template part is included. | (None) |
| woocommerce_after_template_part | Fires after any WooCommerce template part is included. | (None) |
Essential List of WooCommerce Product Page Filters
| Group & Location | Hook Name | Description & Parameters |
|---|---|---|
| Pricing & Description | woocommerce_get_price_html | Filters the HTML output of the product price. |
| woocommerce_short_description | Filters the product short description text. | |
| Add to Cart Text & Input | woocommerce_product_add_to_cart_text | Filters the “Add to Cart” button text on archive/shop pages. |
| woocommerce_product_single_add_to_cart_text | Filters the “Add to Cart” button text on single product pages. | |
| woocommerce_quantity_input_args | Filters arguments for the quantity input field (min, max, step). | |
| Tabs & Headings | woocommerce_product_tabs | Filters the entire array of product tabs. |
| woocommerce_product_tabs_title | Filters the title/label of a specific tab. | |
| woocommerce_product_tabs_panel | Filters the content of a specific tab panel. | |
| woocommerce_product_description_heading | Filters the heading text for the Description tab. | |
| woocommerce_product_additional_information_heading | Filters the heading text for the Additional Information tab. | |
| woocommerce_product_reviews_heading | Filters the heading text for the Reviews tab. | |
| woocommerce_product_related_products_heading | Filters the heading text for the Related Products section. | |
| woocommerce_product_description_tab_content | Filters the content of the default Description tab. | |
| Related/Upsell Products | woocommerce_upsell_display_args | Filters arguments for upsell products query. |
| woocommerce_output_related_products_args | Filters arguments for related products query. | |
| Attributes & Ratings | woocommerce_product_attributes_table_rows | Filters rows in the Additional Information attributes table. |
| woocommerce_product_get_rating_html | Filters HTML for star rating display. | |
| Reviews | woocommerce_product_review_list_args | Filters arguments for retrieving product reviews. |
| Gallery | woocommerce_product_thumbnails_columns | Filters number of columns for product thumbnails. |
| woocommerce_single_product_image_html | Filters the HTML markup of the main product image. |
PRO Tip: Bookmark our other Visual WooCommerce Hook Guides.
Code Examples: Actions vs. Filters in WooCommerce Product Page
These code snippets demonstrate how to use Actions to add content and Filters to modify text on the Single Product Page.
Where to put this code? Always add custom code to your child theme’s functions.php file or, ideally, a custom functionality plugin. Never edit core theme files!
For a deep dive into WooCommerce hooks and filters refer to our comprehensive WooCommerce Developer Resource Hub.
1. WooCommerce Product Page Action Example: Inserting a Custom Banner
This example uses the woocommerce_after_single_product_summary Action Hook to inject new HTML content right above the product tabs area.
PHP
/**
* Action Hook Example: Add a custom banner after the product summary.
* Priority 5 ensures it runs *before* the default tabs (which usually run at 10).
*/
function my_custom_shipping_banner() {
// We confirm we are on a single product page before output
if ( is_product() ) {
echo '<div class="custom-shipping-info">';
echo '<h3>Free Shipping on all orders over $50!</h3>';
echo '<p>All orders placed before 3 PM EST EST ship out today.</p>';
echo '</div>';
}
}
// Hook into the area just after the product summary
add_action( 'woocommerce_after_single_product_summary', 'my_custom_shipping_banner', 5 );2. WooCommerce Product Page Filter Example: Customizing the Button Text
This example uses the woocommerce_product_single_add_to_cart_text Filter Hook to change the “Add to Cart” button text, making it conditional based on the product type.
PHP
/**
* Filter Hook Example: Change the Add to Cart button text on the single product page.
* NOTE: You MUST return the value ($text) at the end of a filter function.
*/
function my_custom_add_to_cart_text( $text, $product ) {
if ( $product->is_type( 'simple' ) ) {
// Change text for simple products
$text = 'Buy Now for Instant Download';
} elseif ( $product->is_type( 'variable' ) ) {
// Change text for variable products
$text = 'Configure Your Item';
}
return $text; // Return the (potentially modified) text
}
// Hook into the filter that controls the button text. The '2' indicates 2 arguments are accepted.
add_filter( 'woocommerce_product_single_add_to_cart_text', 'my_custom_add_to_cart_text', 10, 2 );Summary: Mastering WooCommerce Product Page Customization
Being aware of the WooCommerce single product page hooks empowers you to customize the user experience and optimise your online store.
The hooks covered here represent all key action points and filters that control the product page layout and functionality. By using these hooks thoughtfully along with practical code examples, you can modify product pages to your exact business needs without risking plugin or theme updates.
This guide serves as both a visual map and a developer reference to streamline your WooCommerce customizations.
FAQs: WooCommerce Product Page Hooks Explained
What is the difference between action hooks and filter hooks in WooCommerce?
Action hooks allow you to insert custom content or functionality at specific points during page rendering. Filter hooks let you modify data or output before it is displayed, such as changing button text or product descriptions.
Can I use these hooks without modifying WooCommerce core files?
Yes. The primary benefit of hooks is that they let you customize functionality via your theme’s functions.php or custom plugins, preserving core plugin integrity and easing updates.
Which hooks should I use to add content before the product summary?
Use woocommerce_before_single_product_summary to insert content just before the product images and summary area begin.
How can I customize the Add to Cart button text using hooks?
Apply filters like woocommerce_product_single_add_to_cart_text to modify the button text on single product pages, or woocommerce_product_add_to_cart_text for archive/shop pages.
Where can I find the default functions attached to each WooCommerce hook?
This article’s table shows common default functions hooked into each action. WooCommerce’s official documentation and template files also list these by default priority.
Are there any deprecated WooCommerce Single Product Page hooks I should avoid?
Yes, for example, woocommerce_share is deprecated for product sharing. Always refer to WooCommerce documentation for the latest recommended hooks.
Did this help? Send a sip
Leave a Reply