Being able to customise the mini cart should be as easy as any other part of WooCommerce. WooCommerce don’t make it particularly easy to find the hooks they publish for each element. Even when found, it’s not exactly easy to see which hooks display where. We gave up in the end and created a visual guide to hooks available in the mini cart!
Mini Cart Hooks
// These are the six hooks WooCommerce have published for the mini cart
woocommerce_before_mini_cart
woocommerce_before_mini_cart_contents
woocommerce_mini_cart_contents
woocommerce_widget_shopping_cart_total
woocommerce_widget_shopping_cart_before_buttons
woocommerce_widget_shopping_cart_after_buttons
Pre-coded Example
/**
* Snippet Name: Show custom text at the top of the WooCommerce Mini Cart.
* Snippet Author: ecommercehints.com
*/
function action_woocommerce_before_mini_cart() {
echo "This will appear at the very top of the mini cart";
};
add_action( 'woocommerce_before_mini_cart', 'action_woocommerce_before_mini_cart', 10, 0 );
Standard View Of The Mini Cart
Mini Cart With Hooks Shown
Mini Cart Hook Usage
My Beanie Store Basket
- Beanie Hat
- 1x $15.00

- Your basket will be held for 30 minutes due to high demand.
-
Subtotal: $15.00
(Price Match Promise Included)
- Proceed to checkout now to avoid disappointment
- Secure Checkout
- Refund Protection
- Free Delivery
Minutes
Seconds
Clear your cookies to reset the timer