WordPress action hook
woocommerce_before_shipping_calculator
Defined by WooCommerce and fired by 12 plugins in total, running on 7M+ sites between them.
How to use woocommerce_before_shipping_calculator
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_before_shipping_calculator', 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.
12 plugins that fire woocommerce_before_shipping_calculator
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
WooCommerce7+ million installs
do_action( 'woocommerce_before_shipping_calculator' )templates/cart/shipping-calculator.php:20 -
KiriminAja Official200+ installs
do_action( 'woocommerce_before_shipping_calculator' )templates/woocommerce/cart/shipping-calculator.php:22 -
Shipping per Neighborhood for WooCommerce200+ installs
do_action( 'woocommerce_before_shipping_calculator' )woocommerce/cart/shipping-calculator.php:15 -
FriendStore for WooCommerce100+ installs
do_action( 'woocommerce_before_shipping_calculator' )templates/woocommerce/cart/shipping-calculator.php:39 -
AMP WooCommerce90+ installs
do_action( 'woocommerce_before_shipping_calculator' )templates/cart/shipping-calculator.php:20 -
CereTax (Legacy)40+ installs
do_action( 'woocommerce_before_shipping_calculator' )woocommerce/cart/shipping-calculator.php:20 -
JagoOngkir20+ installs
do_action( 'woocommerce_before_shipping_calculator' )templates/cart/shipping-calculator.php:5 -
سرویس خرید پستی ماها10+ installs
do_action( 'woocommerce_before_shipping_calculator' )cart/ostanselect-shipping-calculator.php:7 -
Sherpa Delivery for WooCommerce10+ installs
do_action( 'woocommerce_before_shipping_calculator' )templates/frontend/cart/shipping-calculator.php:29 -
Woo NovaPoshta Shipping Method10+ installs
do_action( 'woocommerce_before_shipping_calculator' )template/woocommerce/cart/shipping-calculator.php:18 -
Shipvista Live Shipping Rates10+ installs
do_action( 'woocommerce_before_shipping_calculator' )templates/woocommerce/cart/shipping-calculator.php:20 -
CereTax NativeFewer than 10 installs
do_action( 'woocommerce_before_shipping_calculator' )woocommerce/cart/shipping-calculator.php:20
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.