WordPress filter hook
woocommerce_empty_price_html
Defined by WooCommerce and fired by 18 plugins in total, running on 7M+ sites between them.
How to use woocommerce_empty_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_empty_price_html', function( $value, $product ) {
// Change $value here.
return $value;
}, 10, 2 );Argument names come from PeachPay's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
18 plugins that fire woocommerce_empty_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_empty_price_html', '', $this )includes/abstracts/abstract-wc-product.php:2142 -
Product Table & List Builder for WooCommerce10,000+ installs
apply_filters( 'woocommerce_empty_price_html', wcpt_price($regular_price), $product )templates/regular_price.php:25 -
Payment Gateway for PayPal Pro, PayPal Checkout & Subscriptions for WooCommerce1,000+ installs
apply_filters( 'woocommerce_empty_price_html', '', $this )subscription/class-wcppprog-sub-product.php:133 -
Multi Currency, Currency Switcher, Exchange Rates for WooCommerce1,000+ installs
apply_filters( 'woocommerce_empty_price_html', '', $variation )lib/Price_Manager.php:72 -
FooSales700+ installs
apply_filters( 'woocommerce_empty_price_html', '', $wc_product )admin/helpers/foosales-api-helper.php:218 -
PeachPay300+ installs
apply_filters( 'woocommerce_empty_price_html', '', $product )core/util/product.php:200 -
GIFT4U200+ installs
apply_filters( 'woocommerce_empty_price_html', '', $this )inc/classes/g4u-product-giftcard.php:118 -
StellarPay200+ installs
apply_filters( 'woocommerce_empty_price_html', '', $this )src/Integrations/WooCommerce/Models/ProductTypes/Traits/WooCommerceProductClassUtilities.php:48 -
BlueSnap Payment Gateway for WooCommerce90+ installs
apply_filters( 'woocommerce_empty_price_html', '', $product )includes/class-wc-bluesnap-multicurrency.php:727 -
REES60+ installs
apply_filters( 'woocommerce_empty_price_html', '', $this )inc/models/rees-product-real-estate.php:209 -
Pars Kit60+ installs
apply_filters( 'woocommerce_empty_price_html', '', $product )includes/Modules/Catalog/OutOfStockPrice.php:126 -
User Post Collections20+ installs
apply_filters( 'woocommerce_empty_price_html', '', $this )controllers/mg-upc-woocommerce.php:618 -
OpenGraphiq Lite20+ installs
apply_filters( 'woocommerce_empty_price_html', '', $product )admin/class-opengraphiq-admin.php:1077 -
TABLEiT20+ installs
apply_filters( 'woocommerce_empty_price_html', '', $product )templates/regular_price.php:19 -
Cryptocurrency Product for WooCommerce10+ installs
apply_filters( 'woocommerce_empty_price_html', '', $product )cryptocurrency-product-for-woocommerce.php:838 -
Albums WooCommerce Plugin10+ installs
apply_filters( 'woocommerce_empty_price_html', '', $this )includes/core/class-post-type.php:68 -
CartNudgeFewer than 10 installs
apply_filters( 'woocommerce_empty_price_html', '', $product )includes/helpers/cartnudge-functions.php:278 -
Project Donations for WooCommerceFewer than 10 installs
apply_filters( 'woocommerce_empty_price_html', '', $product )includes/class-woocommerce.php:522
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.