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:

functions.php
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.

  1. WooCommerce icon WooCommerce7+ million installs do_action( 'woocommerce_before_shipping_calculator' ) templates/cart/shipping-calculator.php:20
  2. KiriminAja Official icon KiriminAja Official200+ installs do_action( 'woocommerce_before_shipping_calculator' ) templates/woocommerce/cart/shipping-calculator.php:22
  3. Shipping per Neighborhood for WooCommerce icon Shipping per Neighborhood for WooCommerce200+ installs do_action( 'woocommerce_before_shipping_calculator' ) woocommerce/cart/shipping-calculator.php:15
  4. FriendStore for WooCommerce icon FriendStore for WooCommerce100+ installs do_action( 'woocommerce_before_shipping_calculator' ) templates/woocommerce/cart/shipping-calculator.php:39
  5. AMP WooCommerce icon AMP WooCommerce90+ installs do_action( 'woocommerce_before_shipping_calculator' ) templates/cart/shipping-calculator.php:20
  6. CereTax (Legacy) icon CereTax (Legacy)40+ installs do_action( 'woocommerce_before_shipping_calculator' ) woocommerce/cart/shipping-calculator.php:20
  7. JagoOngkir icon JagoOngkir20+ installs do_action( 'woocommerce_before_shipping_calculator' ) templates/cart/shipping-calculator.php:5
  8. سرویس خرید پستی ماها icon سرویس خرید پستی ماها10+ installs do_action( 'woocommerce_before_shipping_calculator' ) cart/ostanselect-shipping-calculator.php:7
  9. Sherpa Delivery for WooCommerce icon Sherpa Delivery for WooCommerce10+ installs do_action( 'woocommerce_before_shipping_calculator' ) templates/frontend/cart/shipping-calculator.php:29
  10. Woo NovaPoshta Shipping Method icon Woo NovaPoshta Shipping Method10+ installs do_action( 'woocommerce_before_shipping_calculator' ) template/woocommerce/cart/shipping-calculator.php:18
  11. Shipvista Live Shipping Rates icon Shipvista Live Shipping Rates10+ installs do_action( 'woocommerce_before_shipping_calculator' ) templates/woocommerce/cart/shipping-calculator.php:20
  12. CereTax Native icon 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.