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!
Table of contents
- WooCommerce Cart Hooks
- Empty Cart Hook
- The List of Cart Hooks
- Remove the default actions on the cart page
- Add custom sections to the cart page
- Customize the WooCommerce checkout form with a FREE plugin ⭐
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 Empty Cart Hook
There is also 1 hook on the empty cart page:
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
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 (
- cart totals next to cross-sells (
- proceed to checkout button under cart totals (
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
The following easy example shows how to add "free shipping" text above the cart table like this:
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. Check it our here:
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.
💾 Active Installations: 90,000+ | WordPress Rating:
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!