WooCommerce Cart Page Hooks – Easy visual hook guide

See our visual guide explaining all the available WooCommerce cart page hooks.
WooCommerce Cart Page Hooks

See below, our visual guide displaying all the WooCommerce cart page hooks which are available on your cart page in WooCommerce.

The WooCommerce cart page offers all these hooks on the cart page so that you can add your own functions to your theme files to add extra functionality to the cart page.

Simply grab the hook name from the guide below and read further down how to implement it with your functions.php file.

Have a look at our StoreCustomizer plugin which has lots of extra useful features for your cart page which you will enjoy from auto-update cart, add banners or custom text, remove the cart product links and more.

Visual display of the WooCommerce Cart Page Hooks:

WooCommerce Cart Page

woocommerce_before_cart
woocommerce_before_cart_table

Product

Price

Quantity

Total

woocommerce_before_cart_contents
StoreCustomizer Test Product

$29

1

$29

StoreCustomizer Test Product

$21

1

$21

woocommerce_cart_contents
Coupon Code
woocommerce_cart_coupon
woocommerce_after_cart_contents
woocommerce_after_cart_table
woocommerce_cart_collaterals

You may be interested in...

WooCustomizer Image Placeholder

Product Title

$18.00
WooCustomizer Image Placeholder

Product Title

$18.00
woocommerce_before_cart_totals

Cart Totals

SubTotal
$89.00
woocommerce_cart_totals_before_shipping
Shipping
woocommerce_before_shipping_calculator
woocommerce_after_shipping_calculator
woocommerce_cart_totals_after_shipping
woocommerce_cart_totals_before_order_total
Total
$89.00
woocommerce_cart_totals_after_order_total
woocommerce_proceed_to_checkout
woocommerce_after_cart_totals
woocommerce_after_cart

Available WooCommerce Cart Page Hooks:

All of these hooks are available in the WooCommerce cart page, they are pretty self explanatory in their position but do refer to the visual hook guide if you’re not 100% sure on where exactly they hook into on the WooCommerce shop page.

If your theme is overriding the WooCommerce templates then it’s possible that these hooks could be missing, or placed in a slightly different position.

Happy Coding!

How to use a PHP hooks on your website:

To use these page hooks you will need a little understanding of php code… You can add the following function to your website using by creating a child theme and then adding this code to the child themes functions.php file, or you can install our Site Customizations plugin and add the php code via the php file provided.

If you are not comfortable using code then please try out our StoreCustomizer plugin which offers a lot of useful functionality using all these hooks for you to customize your WooCommerce store… No coding knowledge needed.

/*
* My Custom Function
*/
function my_custom_function( array $params ) {
// Some Code Here
}
add_filter( 'woocommerce_after_cart_contents​', 'my_custom_function', 20 );

Our free StoreCustomizer plugin offers different functionality to add sold out banners, product sales statistics, stock amounts and lots more to your WooCommerce shop page, all from a visual interface so you don’t need to touch any code… Have a look yourself and see what all StoreCustomizer offers.