WordPress action hook
woocommerce_calculated_shipping
Defined by WooCommerce and fired by 14 plugins in total, running on 7.2M+ sites between them.
“This action is documented in WooCommerce's WC_Shortcode_Cart::calculate_shipping().”
How to use woocommerce_calculated_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_calculated_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.
14 plugins that fire woocommerce_calculated_shipping
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
WooCommerce7+ million installs
do_action( 'woocommerce_calculated_shipping' )includes/shortcodes/class-wc-shortcode-cart.php:59 -
Payment Plugins for Stripe WooCommerce100,000+ installs
do_action( 'woocommerce_calculated_shipping' )includes/wc-stripe-functions.php:363 -
ShopEngine90,000+ installs
do_action( 'woocommerce_calculated_shipping' )utils/shipping-calculation.php:67 -
FunnelKit Payment Gateway for Stripe WooCommerce20,000+ installs
do_action( 'woocommerce_calculated_shipping' )includes/traits/wc-smart-button-functions.php:827 -
Afterpay Gateway for WooCommerce10,000+ installs
do_action( 'woocommerce_calculated_shipping' )class/class-wc-gateway-afterpay.php:1695 -
Shipping Simulator for WooCommerce6,000+ installs
do_action( 'woocommerce_calculated_shipping' )classes/Tweaks.php:127 -
CoDesigner4,000+ installs
do_action( 'woocommerce_calculated_shipping' )widgets/cart-overview/assets/templates/cart-totals.php:57 -
Payment Plugins Braintree For WooCommerce2,000+ installs
do_action( 'woocommerce_calculated_shipping' )includes/wc-braintree-functions.php:1368 -
Addonify Floating Cart For WooCommerce2,000+ installs
do_action( 'woocommerce_calculated_shipping' )public/class-addonify-floating-cart-public.php:1026 -
Clearpay Gateway for WooCommerce1,000+ installs
do_action( 'woocommerce_calculated_shipping' )class/class-wc-gateway-clearpay.php:1684 -
SaleDash10+ installs
do_action( 'woocommerce_calculated_shipping' )includes/api/class-w2w-rest-cart-controller.php:576 -
Subscriptions & Recurring Payments for WooCommerce10+ installs
do_action( 'woocommerce_calculated_shipping' )inc/classes/class-awc-subscription-cart.php:1015 -
Payments via Stripe for WooCommerce10+ installs
do_action( 'woocommerce_calculated_shipping' )includes/wpp-functions.php:330 -
ARN Smart AI-Powered Site Utilities for ElementorFewer than 10 installs
do_action( 'woocommerce_calculated_shipping' )includes/class-arnsmesu-woo-product-shipping-rates.php:253
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.