• Skip to primary navigation
  • Skip to main content
  • Skip to footer
Essential Premium WooCommerce Plugins - WP Desk
  • Plugins
  • Bundle
  • Support
  • Blog
  • My Account
  • 0

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.

Maciej Swoboda

WooCommerce Cart Page Hooks - A Visual Guide with Examples

Updated: January 23, 2023 / Plugin Tutorials

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!

Table of contents

  1. WooCommerce Cart Hooks
  2. Empty Cart Hook
  3. The List of Cart Hooks
  4. Remove the default actions on the cart page
  5. Add custom sections to the cart page

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

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

Checkout Editor Plugin to customize the checkout form

We have developed a plugin that will help you in editing the WooCommerce checkout form. Check it our here:

Flexible Checkout Fields PRO WooCommerce £59

Edit, add new or hide unnecessary fields from the WooCommerce checkout form. It's all about conversions and better user experience.

Add to cart or View Details
WP Desk
80,000+ Active Installations
Last Updated: 2023-03-15
Works with WooCommerce 7.1 - 7.5.x

Summary

Today, I've shown you the list of WooCommerce cart actions and filters, and how to use them to customize the cart page.

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

Wanna know more about WooCommerce cart hooks?

  • WooCommerce Checkout Hooks

    woocommerce checkout visual hooks
    A visual guide with examples. Find out how to add WooCommerce checkout hooks with our visual guide.

  • How to Customize WooCommerce Checkout?

    checkout page customization
    WooCommerce checkout page customization. How to edit & customize the WooCommerce checkout page to speed it up and increase your sales thanks to your custom order form?

Tweet

2 minutes read37045 views

Maciej Swoboda

Founder of WP Desk, in love with WordPress since 2006. He believes in the power of WP community, speaks at WordCamps around the world and helps people build better businesses with WooCommerce.

Developer's Guide WooCommerce Hooks Visual Guides

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 →

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.

WP Desk › Plugin Tutorials › WooCommerce Cart Page Hooks - A Visual Guide with Examples

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
  • Contact us

Products

  • Premium Plugins
  • Get Support
  • WooCommerce Invoices
  • Email Marketing
  • Octolize

Legal

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

© 2023 WP Desk