WordPress action hook
woocommerce_cart_totals_before_shipping
Defined by WooCommerce and fired by 17 plugins in total, running on 8.1M+ sites between them.
How to use woocommerce_cart_totals_before_shipping
It's an action: your callback runs at that point. Nothing needs to be returned.
Add this to your theme's functions.php or a small custom plugin:
add_action( 'woocommerce_cart_totals_before_shipping', function() {
// Your code runs here.
}, 10, 1 );Argument names come from WooCommerce's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
17 plugins that fire woocommerce_cart_totals_before_shipping
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
WooCommerce7+ million installs
do_action( 'woocommerce_cart_totals_before_shipping' )templates/cart/cart-totals.php:43 -
Essential Addons for Elementor1+ million installs
do_action( 'woocommerce_cart_totals_before_shipping' )includes/Template/Woocommerce/Cart/Woo_Cart_Helper.php:302 -
ShopEngine90,000+ installs
do_action( 'woocommerce_cart_totals_before_shipping' )widgets/cart-totals/screens/default.php:74 -
CoDesigner4,000+ installs
do_action( 'woocommerce_cart_totals_before_shipping' )widgets/cart-overview/assets/templates/cart-totals.php:106 -
WowStore4,000+ installs
do_action( 'woocommerce_cart_totals_before_shipping' )blocks/woo/cart_total/Template.php:42 -
ShopEngine Gutenberg WooCommerce Builder Blocks Addon3,000+ installs
do_action( 'woocommerce_cart_totals_before_shipping' )blocks/cart-totals/screen.php:50 -
WC Booster700+ installs
do_action( 'woocommerce_cart_totals_before_shipping' )woocommerce/cart/cart-totals.php:41 -
ShopPress600+ installs
do_action( 'woocommerce_cart_totals_before_shipping' )public/templates/cart/cart-totals.php:36 -
PDF Invoice for WooCommerce + Drag and Drop Template Builder500+ installs
do_action( 'woocommerce_cart_totals_before_shipping' )woocommerce/templates/carts/cart-totals.php:17 -
KiriminAja Official200+ installs
do_action( 'woocommerce_cart_totals_before_shipping' )templates/woocommerce/cart/cart-totals.php:61 -
Shopready100+ installs
do_action( 'woocommerce_cart_totals_before_shipping' )src/extension/templates/tpl/cart/cart-totals.php:38 -
WebSync Checkout for Elementor50+ installs
do_action( 'woocommerce_cart_totals_before_shipping' )templates/cart/custom-cart-totals.php:48 -
Max Elements for Elementor10+ installs
do_action( 'woocommerce_cart_totals_before_shipping' )elementor/helpers/woo_cart.php:266 -
Global Seller Services for WooCommerce10+ installs
do_action( 'woocommerce_cart_totals_before_shipping' )templates/TaxCalculation/cart-totals.php:91 -
Connector for WooToApp Mobile10+ installs
do_action( 'woocommerce_cart_totals_before_shipping' )woo-to-app.php:438 -
Cresta Checkout for WooCommerceFewer than 10 installs
do_action( 'woocommerce_cart_totals_before_shipping' )inc/blocks/blocks-cart.php:282 -
BazarioFewer than 10 installs
do_action( 'woocommerce_cart_totals_before_shipping' )elements/widgets/cart-totals/cart-totals.php:1127
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.