WordPress filter hook
woocommerce_variable_price_html
Defined by WooCommerce and fired by 13 plugins in total, running on 7.1M+ sites between them.
How to use woocommerce_variable_price_html
It's a filter: your callback receives the value and 1 more argument, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'woocommerce_variable_price_html', function( $value, $product ) {
// Change $value here.
return $value;
}, 10, 2 );Argument names come from Product Feed for Google Shopping, Microsoft Advertising and 40+ Channels for WooCommerce Merchant's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
13 plugins that fire woocommerce_variable_price_html
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
WooCommerce7+ million installs
apply_filters( 'woocommerce_variable_price_html', $price . $this->get_price_suffix(), $this )includes/class-wc-product-variable.php:203 -
FOX50,000+ installs
apply_filters( 'woocommerce_variable_price_html', $price, $product )classes/compatibility/woocommerce_subscriptions.php:144 -
Product Feed for Google Shopping, Microsoft Advertising and 40+ Channels for WooCommerce Merchant2,000+ installs
apply_filters( 'woocommerce_variable_price_html', $price . $product->get_price_suffix(), $product )helpers/helper.php:1019 -
FooSales700+ installs
apply_filters( 'woocommerce_variable_price_html', $price . $wc_product->get_price_suffix(), $wc_product )admin/helpers/foosales-api-helper.php:215 -
Milo Subscriptions200+ installs
apply_filters( 'woocommerce_variable_price_html', $price_html . $this->get_price_suffix(), $this )includes/product/class-product-variable-subscription.php:181 -
Pizza builder for WooCommerce30+ installs
apply_filters( 'woocommerce_variable_price_html', $price . $product_pizza->get_price_suffix(), $product )includes/pizza-display.php:68 -
OpenGraphiq Lite20+ installs
apply_filters( 'woocommerce_variable_price_html', $price . $product->get_price_suffix(), $product )admin/class-opengraphiq-admin.php:1100 -
Cryptocurrency Product for WooCommerce20+ installs
apply_filters( 'woocommerce_variable_price_html', $price . $product->get_price_suffix(), $product )cryptocurrency-product-for-woocommerce.php:882 -
Frisbii Billing20+ installs
apply_filters( 'woocommerce_variable_price_html', $price . $this->get_price_suffix(), $this )includes/WC_Product_Reepay_Variable_Subscription.php:56 -
Mobile App for WooCommerce: ShopApper Mobile App Builder Service for WooCommerce10+ installs
apply_filters( 'woocommerce_variable_price_html', wc_format_price_range(0, $default_variation_price) . $object->get_price_suffix(), $this )Controllers/ProductController.php:383 -
Subscriptions & Recurring Payments for WooCommerce10+ installs
apply_filters( 'woocommerce_variable_price_html', $price, $this )inc/classes/class-wc-product-variable-subscription.php:110 -
Themex Currency Manager for WooCommerce10+ installs
apply_filters( 'woocommerce_variable_price_html', $price . $product->get_price_suffix(), $product )includes/class-wc-integration.php:447 -
Bonus Plus for Woocommerce10+ installs
apply_filters( 'woocommerce_variable_price_html', $price . $product->get_price_suffix(), $product )includes/Actions/Product.php:96
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.