WooCommerce Hooks & Filters

Explore WooCommerce action hooks and filters for product pages, cart totals, checkout fields, and orders, with concise explanations and PHP examples.

Actions run your PHP callback at a defined point in WooCommerce. Filters pass a value to your callback and expect you to return the value, with or without changes. Both are types of WordPress hooks.

Hook Type Category Description
woocommerce_before_single_product_summary Action Product pages Run code before the classic product summary appears.
woocommerce_single_product_summary Action Product pages Add content among the default product details and purchase controls.
woocommerce_product_tabs Filter Product pages Change the array of product tabs and their settings.
woocommerce_loop_add_to_cart_link Filter Shop listings Filter the add-to-cart link HTML used in classic product loops.
woocommerce_before_calculate_totals Action Cart Inspect or change cart items before totals are calculated.
woocommerce_cart_calculate_fees Action Cart Add conditional fees while WooCommerce calculates cart fees.
woocommerce_checkout_fields Filter Checkout Adjust field definitions in the classic shortcode checkout.
woocommerce_order_status_changed Action Orders React when an order moves from one status to another.

This independent reference is maintained by HoverCraft. For implementation details and newly added hooks, consult the official WooCommerce hook index and check the compatibility notes on each page.