• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WP Desk = premium plugins for WordPress & WooCommerce
  • Plugins
        • Checkout & OrdersMake your work easier and automate the orders. Adjust the order form to your needs and make it more useful to your customers. Print order labels directly from WooCommerce. Put the orders in order using our plugins. Find out how to streamline the procurement process in your store.
          • Flexible Checkout Fields
          • Active Payments
          • Automatic Payment Status
          • Flexible Refund and Return Order
          • Print Orders and Address Labels
          • Flexible Subscriptions Recurring Shipping
          • Flexible Subscriptions Payment Retry
          • Flexible Subscriptions Stock Management
        • ProductsThese plugins will help you manage your WooCommerce products. Here you will find the plugins to import and update products from XML or CSV files. Then you can change the product unit of measure, show the lowest price in the last 30 days (Omnibus Directive), or let customers name the product price!
          • Flexible Product Fields
          • Dropshipping Import Products
          • Dropshipping FTP Import Products
          • Dropshipping Export Products
          • Custom Price
          • WP Desk Omnibus
          • Flexible Quantity Calculator
          • Dropshipping Orders Export
        • MarketingPromote your store online. Add products from your shop to price comparison websites directly from WooCommerce. Acquire new customers and communicate with your existing ones. Build a customer base and communicate with clients using one of the most effective marketing tools, namely e-mail marketing. Check out our promotional tools!
          • Flexible Pricing
          • Flexible Wishlist - Analytics & Emails
          • OLX WooCommerce
          • Flexible PDF Coupons
          • ShopMagic
          • Flexible Invoices
  • Bundle🔥
  • WP Desk Care
  • Support
  • Blog
  • My Account
  • 0

More results

WooCommerce Cart Page Hooks - A Visual Guide (code examples)

Plugin Tutorials, Tech Posts, WooCommerce checkout fields, WooCommerce tutorials

Maciej Swoboda2 minutes read2025-08-20
blog category heading image

WooCommerce is extremely friendly for developers because it has a ton of actions and filters - called hooks. We use them often when we develop WooCommerce plugins and tweak our cart page, here at WP Desk. No matter if you are a beginner or advanced WooCommerce developer, we created this visual guide to help you find just the WooCommerce cart page hooks you're looking for. Let's begin!

💡 You can also see a visual guide about WooCommerce checkout page hooks!

Contents

  • WooCommerce Cart Hooks
  • WooCommerce Empty Cart Hook
  • WooCommerce Cart Page Hooks 🪝- The Complete List
    • Cart filters for products (only for classic cart)
    • WooCommerce cart page hooks - how to use them?
  • Remove the default actions on the cart page
  • Add custom sections to the cart page
  • WooCommerce Checkout Editor FREE Plugin to customize the checkout form
    • Flexible Checkout Fields WooCommerce
  • Summary
    • Related Articles
  • WooCommerce Checkout Page Hooks - A Visual Guide with Examples
  • WooCommerce Checkout - Settings, Shortcode & Configuration Guide
  • How to change the WooCommerce shop page (options & customization)
  • WooCommerce Checkout Page: settings, missing options & errors
  • WooCommerce shortcodes & blocks - the complete list with examples

WooCommerce Cart Hooks

👀 Let's see all hooks available for the WooCommerce cart page. This guide is based on the official WooCommerce theme Storefront.

WooCommerce Cart Hooks Visual Guide
WooCommerce Cart Hooks Visual Guide - Click to enlarge

WooCommerce Empty Cart Hook

There is also 1 hook on the empty cart page:

WooCommerce cart page hook
WooCommerce Empty Cart Hook - Click to enlarge

You can use this hook, for example, to let your customers go to some specific categories, products, or homepage.

WooCommerce Cart Page Hooks 🪝- The Complete List

  • woocommerce_before_cart
  • woocommerce_before_cart_table
  • woocommerce_before_cart_contents
  • woocommerce_cart_contents
  • woocommerce_cart_coupon
  • woocommerce_cart_actions
  • woocommerce_after_cart_contents
  • woocommerce_after_cart_table
  • woocommerce_cart_collaterals
  • woocommerce_before_cart_totals
  • woocommerce_cart_totals_before_shipping
  • woocommerce_after_shipping_rate
  • woocommerce_before_shipping_calculator
  • woocommerce_after_shipping_calculator
  • woocommerce_cart_totals_after_shipping
  • woocommerce_cart_totals_before_order_total
  • woocommerce_cart_totals_after_order_total
  • woocommerce_proceed_to_checkout
  • woocommerce_after_cart_totals
  • woocommerce_after_cart
  • woocommerce_cart_is_empty
It's possible to use the WooCommerce cart hooks in a custom code or a plugin.

Cart filters for products (only for classic cart)

There are also additional filters for WooCommerce classic cart to customize the product listing.

  • woocommerce_cart_item_name
  • woocommerce_cart_item_price
  • woocommerce_cart_item_quantity
  • woocommerce_cart_item_subtotal

WooCommerce filters for products in the cart

The name and price filters will also work for the product name & price in the WooCommerce classic checkout.

WooCommerce cart page hooks - how to use them?

  1. Prepare custom code (or a plugin)
  2. Use a staging/ testing site before using the code live
  3. Add the custom code can be added to the theme's functions.php file
  4. Refresh the cart page (with products)
  5. Test and optimize the code

Remove the default actions on the cart page

By default only some of the hooks are used by WooCommerce to add:

  • cross-sells next to cart totals (woocommerce_cross_sell_display)
  • cart totals next to cross-sells (woocommerce_cart_totals)
  • proceed to checkout button under cart totals (woocommerce_button_proceed_to_checkout)

You can easily remove these functions by pasting the following code to the functions.php file in your theme or preferably child theme.

Add custom sections to the cart page

💡You can also easy add some texts or sections to the cart page and you do not need to edit WooCommerce templates!

The following easy example shows how to add "free shipping" text above the cart table like this:

Add text WooCommerce Cart Page. WooCommerce cart visual hooks
Add "free shipping" text before the WooCommerce cart table

WooCommerce Checkout Editor FREE Plugin to customize the checkout form

We have developed a plugin that will help you in editing the WooCommerce checkout form.

Flexible Checkout Fields WooCommerce

Edit, add new or hide unnecessary fields from the WooCommerce checkout form. Add pricing to fields and use conditional logic. It's all about conversions and better user experience. NEW: now you can set multiple conditions (OR) under one or more condition groups (AND).

💾 Active Installations: 80,000+ | WordPress Rating:

Download for free or Go to WordPress.org
WP Desk
80,000+ Active Installations
Last Updated: 2026-08-19
Works with WooCommerce 10.7 - 11.1
There is also a premium version of the plugin. You may see all features of the Flexible Checkout Fields plugin & customize your WooCommerce checkout easily!

Summary

Today, I've shown you the list of WooCommerce cart hooks and how to use them to customize the cart page. Enhancing the WooCommerce cart page with actions and filters may improve appearance (CSS styling, new labels), or add new functionalities.

If you have any questions, let me know in the comment section below!

Related Articles

Checkout page hooks - visual and hook list

WooCommerce Checkout Page Hooks - A Visual Guide with Examples

WooCommerce is extremely friendly for developers because it has a ton of actions and filters - or just hooks. We use them often when we develop WooCom...
woocommerce_checkout shortcode and WooCommerce checkout settings

WooCommerce Checkout - Settings, Shortcode & Configuration Guide

WooCommerce checkout features - which are mostly related to payment settings - play a vital role in running an online store. It's often thanks to them...
How to change the WooCommerce shop page (options and customization)

How to change the WooCommerce shop page (options & customization)

Being one of the standard WooCommerce pages, the shop page can come with additional settings. In this article, you may read about the WooCommerce shop...
WooCommerce checkout settings

WooCommerce Checkout Page: settings, missing options & errors

Today, I will guide you through all WooCommerce options, missing settings, and FAQ about the checkout page and common error messages. You need to set ...
WooCommerce shortcodes (practical guide with the cart, checkout, products, shop, product, and login shortcode examples)

WooCommerce shortcodes & blocks - the complete list with examples

You may find many posts about WooCommerce shortcodes online. In this article, you’ll find the full WooCommerce shortcode list with screenshots. Quickl...

2 minutes read78622 views

Reader Interactions

Comments

  1. Saud Razzak says

    2018-01-22 at 13:20

    This guide is very useful and applicable when making WooCommerce stores. Thanks for sharing!

    Reply
    • Maciek Swoboda says

      2018-01-24 at 21:26

      Thank you Saud. Glad you liked it!

      Reply
  2. luk says

    2018-02-22 at 09:11

    thank you, I have been looking for it for a long time, salvation for devs !

    Reply
    • Maciek Swoboda says

      2018-02-27 at 16:17

      Great. Happy I could help :)

      Reply
  3. Purnendu Sarkar says

    2018-03-21 at 11:33

    woocommerce cart page shipping calculator i click but not open this section how to solve it.plz help me!

    Reply
  4. David Bennett says

    2018-04-18 at 13:37

    In the Calculate Shipping options on the Cart page, I want to just have the country. I want to remove state/county/city/zip/postcode I can remove the city and the zip/postcode with snippets like this – but I can’t figure out how to remove County/State add_filter( ‘woocommerce_shipping_calculator_enable_city’, ‘__return_false’ ); Do you know what the filter is?

    Reply

Leave a Reply Cancel reply

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

Maciej Swoboda

...

Powered by WP Desk

WP Desk brings you great WooCommerce plugins. We strive to save your time and money by speeding up your processes. Use our plugins to build a better store. Awesome support included in the package.

Premium WooCommerce Plugins →
WP Desk › Blog › WooCommerce tutorials › WooCommerce Cart Page Hooks - A Visual Guide (code examples)

Primary Sidebar

Contents

  • WooCommerce Cart Hooks
  • WooCommerce Empty Cart Hook
  • WooCommerce Cart Page Hooks 🪝- The Complete List
    • Cart filters for products (only for classic cart)
    • WooCommerce cart page hooks – how to use them?
  • Remove the default actions on the cart page
  • Add custom sections to the cart page
  • WooCommerce Checkout Editor FREE Plugin to customize the checkout form
    • Flexible Checkout Fields WooCommerce
  • Summary

Flexible Checkout Fields PRO WooCommerce $59

Edit, add new or hide unnecessary fields from the WooCommerce checkout form. Add pricing to fields and use conditional logic. It's all about conversions and better user experience. NEW: now you can set multiple conditions (OR) under one or more condition groups (AND).

💾 Active Installations: 80,000+ | WordPress Rating:

Add to cart or View Details
WP Desk
80,000+ Active Installations
Last Updated: 2026-08-20
Works with WooCommerce 10.7 - 11.1

Stay updated on our how-to articles

WP Desk news, WooCommerce tips, promo codes - right to your inbox.

By entering your e-mail, you agree to our Terms & Conditions and Privacy Policy.

By entering your e-mail, you agree to our Terms & Conditions and Privacy Policy.

Footer

WP Desk - WooCommerce Plugins

At WP Desk we create great WooCommerce plugins with awesome support. Save time and money with our e-commerce solutions. See how we can help you improve your e-store →

Secured by Comodo

WP Desk

  • About us
  • Giving Back
  • Blog
  • Get Support
  • Contact us

Products

  • Premium Plugins
  • WP Desk Care
  • Documentation
  • WooCommerce Invoices
  • Email Marketing
  • PDF Coupons

Legal

  • Terms & Conditions
  • Refund Policy
  • Support Policy
  • Privacy Policy

© 2026 WP Desk

We value your privacy

We use necessary cookies to make our site work. We'd also like to set additional cookies to understand site usage, enhance your browsing experience, and serve personalized ads or content. By clicking ‘Accept All,’ you consent to our use of additional cookies.

Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
View preferences
  • {title}
  • {title}
  • {title}