WordPress filter hook
woocommerce_get_price_excluding_tax
Defined by WooCommerce and fired by 8 plugins in total, running on 7M+ sites between them.
“To get price excluding tax”
How to use woocommerce_get_price_excluding_tax
It's a filter: your callback receives the value and 2 more arguments, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'woocommerce_get_price_excluding_tax', function( $return_price, $qty, $product ) {
// Change $return_price here.
return $return_price;
}, 10, 3 );Argument names come from WooCommerce's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
8 plugins that fire woocommerce_get_price_excluding_tax
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
WooCommerce7+ million installs
apply_filters( 'woocommerce_get_price_excluding_tax', $return_price, $qty, $product )includes/wc-product-functions.php:1687 -
Event Booking Manager for WooCommerce6,000+ installs
apply_filters( 'woocommerce_get_price_excluding_tax', $return_price, $qty, $product )inc/mep_functions.php:3869 -
Dynamic Pricing With Discount Rules for WooCommerce5,000+ installs
apply_filters( 'woocommerce_get_price_excluding_tax', $return_price, $qty, $product )includes/discount/class-awdp-discount-utilities.php:365 -
ELEX WooCommerce Role Based Pricing2,000+ installs
apply_filters( 'woocommerce_get_price_excluding_tax', $price, $qty, $product )elex-includes/elex-functions.php:158 -
Zakeke Interactive Product Designer for WooCommerce1,000+ installs
apply_filters( 'woocommerce_get_price_excluding_tax', $return_price, $qty, $product )includes/zakeke-core-functions.php:965 -
ELEX WooCommerce Dynamic Pricing and Discounts700+ installs
apply_filters( 'woocommerce_get_price_excluding_tax', $price, $qty, $product )includes/elex-common-functions.php:302 -
FooSales700+ installs
apply_filters( 'woocommerce_get_price_excluding_tax', $return_price, $qty, $wc_product )admin/helpers/foosales-api-helper.php:275 -
Wow Extensions for WooCommerceFewer than 10 installs
apply_filters( 'woocommerce_get_price_excluding_tax', $price, $qty, $product )extensions/role-based-pricing/wow-includes/wow-functions.php:158
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.