• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Able Rabbit LogoAble Rabbit

  • Home
  • Reviews
    • Extensions
    • Themes
    • Hosting
  • WooCommerce Tutorials
    • Product Page Customizations
    • Cart & Checkout Optimization
    • Account & User Experience
    • Emails & Automation
    • Pricing, Coupons & Discounts
    • Shipping, Tax & Order Management
    • Affiliate, Membership & Marketing Tools
    • Advanced Developer Customizations
  • Developers Guide
    • Visual Hook Guides
    • Code Snippets
    • Advanced Woo
You are here: Home / Visual Guides / WooCommerce Cart Page Hooks: Visual Guide + Full List

WooCommerce Cart Page Hooks: Visual Guide + Full List

By Able Rabbit / November 15, 2025

Bookmark this definitive Visual guide and complete reference of all WooCommerce Cart page - ShortCode or Classic version hooks (Actions & Filters) with code examples.

This article was last manually reviewed for data accuracy on 15 November 2025.

The WooCommerce cart page is a critical part of any online store, where visitors review their selected products before proceeding to checkout. This visual guide explores these cart page hooks, detailing their locations and typical uses, helping you tailor your store’s cart page precisely to your needs.

Note: The hooks listed in this visual guide are all classic hooks tied to PHP templates. They are available only on classic cart pages using the [woocommerce_cart] shortcode or via the standard WooCommerce cart endpoint. The modern Block page supports different hooks which we will list separately.

Table of Contents

  • Visual Guide: WooCommerce Classic Cart Page Hooks
  • Complete List of WooCommerce Classic Cart Page Action Hooks
  • Essential List of WooCommerce Classic Cart Page Filters
  • Code Examples: Actions vs. Filters in WooCommerce Classic Cart Page
  • Summary: Mastering WooCommerce Classic Cart Page Customization
  • FAQs: WooCommerce Clasic Cart Page Hooks

Visual Guide: WooCommerce Classic Cart Page Hooks

Complete List of WooCommerce Classic Cart Page Action Hooks

Group & LocationHook NameDescription & UsageDefault Functions
Cartwoocommerce_before_cartFires before the cart form is rendered. Useful for notices or custom markup.None
woocommerce_before_cart_tableRuns before the cart table markup.None
woocommerce_before_cart_contentsBefore cart items loop.None
woocommerce_cart_contentsInside cart items loop.None
woocommerce_cart_couponDisplays coupon form.woocommerce_cart_coupon()
woocommerce_cart_actionsDisplays update cart button.woocommerce_cart_actions()
woocommerce_after_cart_contentsAfter cart items loop.None
woocommerce_after_cart_tableAfter cart table markup.None
woocommerce_after_cartAfter entire cart form.None
Cart Totalswoocommerce_before_cart_totalsBefore cart totals table.None
woocommerce_cart_totals_before_shippingBefore shipping rows.None
woocommerce_cart_totals_before_shipping_labelBefore shipping label cell.None
woocommerce_cart_totals_after_shipping_labelAfter shipping label cell.None
woocommerce_cart_totals_after_shippingAfter shipping rows.None
woocommerce_cart_totals_before_order_totalBefore order total row.None
woocommerce_cart_totals_after_order_totalAfter order total row.None
woocommerce_after_cart_totalsAfter totals table.None
woocommerce_cart_totals_before_proceed_to_checkoutBefore checkout button.None
woocommerce_proceed_to_checkoutDisplays checkout button.woocommerce_button_proceed_to_checkout()
Cart Shippingwoocommerce_before_shipping_calculatorBefore shipping calculator form.None
woocommerce_after_shipping_calculatorAfter shipping calculator form.None
Cart Empty woocommerce_cart_is_emptyDisplays message when cart is empty.wc_empty_cart_message()
Cart Collateralswoocommerce_before_cart_collateralsBefore cross-sells / totals section.None
woocommerce_cart_collateralsDisplays cross-sells and totals.woocommerce_cart_collaterals()

Essential List of WooCommerce Classic Cart Page Filters

Group & LocationHook NameDescription & Parameters
Cart Itemswoocommerce_cart_item_productFilters product object for cart item.
Params: $product, $cart_item, $cart_item_key
woocommerce_cart_item_product_idFilters product ID for cart item.
Params: $product_id, $cart_item, $cart_item_key
woocommerce_cart_item_permalinkFilters product permalink.
Params: $permalink, $cart_item, $cart_item_key
woocommerce_cart_item_thumbnailFilters product thumbnail HTML.
Params: $thumbnail, $cart_item, $cart_item_key
woocommerce_cart_item_nameFilters product name HTML.
Params: $name, $cart_item, $cart_item_key
woocommerce_cart_item_quantityFilters quantity input HTML.
Params: $quantity, $cart_item, $cart_item_key
woocommerce_cart_item_priceFilters price HTML.
Params: $price, $cart_item, $cart_item_key
woocommerce_cart_item_subtotalFilters subtotal HTML.
Params: $subtotal, $cart_item, $cart_item_key
woocommerce_cart_item_remove_linkFilters remove link HTML. Params: $link, $cart_item_key
woocommerce_cart_item_classFilters CSS class for cart row.
Params: $class, $cart_item, $cart_item_key
woocommerce_cart_item_dataFilters custom meta data display.
Params: $item_data, $cart_item
woocommerce_cart_item_visibleControls visibility of cart item.
Params: $visible, $cart_item, $cart_item_key
woocommerce_cart_item_keyFilters cart item key.
Params: $cart_item_key, $cart_item
Cart Totalswoocommerce_cart_totals_shipping_htmlFilters shipping row HTML.
Params: $shipping_html
Cart Shippingwoocommerce_shipping_calculator_enable_cityEnable/disable city field.
Params: $enabled
woocommerce_shipping_calculator_enable_postcodeEnable/disable postcode field.
Params: $enabled
woocommerce_shipping_calculator_enable_stateEnable/disable state field.
Params: $enabled
woocommerce_cart_hide_shipping_when_free_is_availableControls hiding of other methods when free shipping is available. Params: $hide, $available_methods
Cart Collateralswoocommerce_cross_sells_columnsFilters number of columns in cross-sells.
Params: $columns
woocommerce_cross_sells_totalFilters number of products in cross-sells.
Params: $limit

Code Examples: Actions vs. Filters in WooCommerce Classic Cart Page

Deep Dive: For a comprehensive understanding of WooCommerce Filter and Hooks refer to WooCommerce Hooks and Filters: Complete Guide with Examples.

WooCommerce Classic cart Page Action Hook Example : Add Custom Notics

Let us Add a custom notice above the cart totals section using the woocommerce_before_cart_totals hook.

php

/**
 * Add a custom message before cart totals.
 */

function able_rabbit_custom_cart_notice() {
    echo '<div class="custom-cart-notice">';
    echo '<p>Don’t forget to apply your coupon before checkout!</p>';
    echo '</div>';
}

add_action( 'woocommerce_before_cart_totals', 'able_rabbit_custom_cart_notice' );

Explanation:

  • This runs right before the cart totals table.
  • Useful for promotional messages, upsells, or reminders.
  • No parameters are passed — you simply echo HTML.

WooCommerce Classic Cart Page Filter Hook Example : Append product SKU to the cart item name.

In this example, we will see how we can use the filter woocommerce_cart_item_name to append product SKU to the cart item name.

php

/**
 * Append SKU to product name in cart.
 *
 * @param string $product_name The product name HTML.
 * @param array  $cart_item    The cart item array.
 * @param string $cart_item_key Unique cart item key.
 * @return string Modified product name.
 */

function able_rabbit_cart_item_name_with_sku( $product_name, $cart_item, $cart_item_key ) {
    $product = $cart_item['data'];
    if ( $product && $product->get_sku() ) {
        $product_name .= '<br><small>SKU: ' . esc_html( $product->get_sku() ) . '</small>';
    }
    return $product_name;
}

add_filter( 'woocommerce_cart_item_name', 'able_rabbit_cart_item_name_with_sku', 10, 3 );

Explanation:

  • This filter modifies the product name output in the cart.
  • Parameters give you access to the product object and cart item data.
  • You can append SKU, custom meta, or any other info.

Summary: Mastering WooCommerce Classic Cart Page Customization

WooCommerce cart page hooks enables you to create a more engaging and user-friendly cart experience. By using the appropriate action and filter hooks, you can add, modify, or remove content, and optimize the functionality and design.

Bookmark this visual guide of WooCommerce Classic Cart page hooks to help you customize your WooCommerce cart confidently.

Before we finish

Master WooCommerce with real tutorials and plugin reviews.

Join Free

FAQs: WooCommerce Clasic Cart Page Hooks

What are WooCommerce cart page hooks?

WooCommerce cart page hooks are predefined points in the cart page template where developers can add or modify content or functionality. They include action hooks for inserting content and filter hooks for modifying existing data or HTML output. These hooks allow customization without editing core WooCommerce files.

How do I use action hooks on the WooCommerce classic cart page?

Action hooks on the WooCommerce cart page let you insert content at specific locations, such as before the cart form (woocommerce_before_cart), inside the cart contents (woocommerce_cart_contents), or after the cart totals (woocommerce_after_cart_totals). You add custom PHP functions hooked to these actions to extend or alter the cart UI.

What are common filter hooks used on the WooCommerce classic cart page?

Common WooCommerce cart page filters include hooks like woocommerce_cart_item_price, which lets you modify the displayed price of each cart item, or woocommerce_cart_item_thumbnail, to change the product image shown. Filters are used to tweak cart item data or presentation dynamically.

Why is it important to know WooCommerce cart page hooks for SEO?

Understanding WooCommerce cart page hooks enables developers to optimize the cart experience, improve page speed by selectively loading content, and add SEO-friendly enhancements such as structured data or custom messaging. Proper use of hooks can reduce bounce rates and improve user experience signals important for SEO.

Where can I find a comprehensive list of WooCommerce cart page hooks?

A comprehensive and up-to-date list of WooCommerce cart page hooks, both action and filter types, is available in WooCommerce developer documentation and community visual guides.

What is the difference between WooCommerce classic Cart page and the WooCommerce block Cart page?

The Classic Cart uses shortcode-based templates and fully supports PHP hooks and custom snippets, making it highly flexible and compatible. The Block Cart uses Gutenberg blocks with limited PHP hook support—customizations often require block filters or React-based code instead of traditional PHP snippets.

Can WooCommerce classic Cart page hooks work on modern block based cart page?

No, the classic cart page hooks do not fire on the modern block based cart page. You must use the hooks for the block based cart page.

PRO Tip: Bookmark all our Visual WooCommerce Hook Guides for ready reference.

Did this help? Send a sip

Related Posts

  • WooCommerce Checkout Page Hooks: Visual Guide + Full List
  • WooCommerce Shop & Archive Page Hooks: Visual Guide + Full List
  • WooCommerce Single Product Page Hooks: Visual Guide + Full List

Reader Interactions

Leave a Reply

Your email address will not be published. Required fields are marked *

Productivity Tools

The Burrow

Master WooCommerce with real tutorials and plugin reviews.

Join Free

  • About
  • Contact
  • Privacy Policy
  • Disclaimer Policy
  • Terms and Conditions

Copyright © 2025 · Able Rabbit. All rights reserved.

Able Rabbit is an independent publication not sponsored or endorsed by WooCommerce® or Automattic Inc.