Skip to content

Instantly share code, notes, and snippets.

@MindyPostoff
Created July 20, 2015 18:57
Show Gist options
  • Save MindyPostoff/a8e5d0be22375dcf94cd to your computer and use it in GitHub Desktop.
Save MindyPostoff/a8e5d0be22375dcf94cd to your computer and use it in GitHub Desktop.
Hide Free Price - WooCommerce
add_filter( 'woocommerce_variable_free_price_html', 'hide_free_price_notice' );
add_filter( 'woocommerce_free_price_html', 'hide_free_price_notice' );
add_filter( 'woocommerce_variation_free_price_html', 'hide_free_price_notice' );
/**
* Hides the 'Free!' price notice
*/
function hide_free_price_notice( $price ) {
return '';
}
@brianreichle
Copy link

brianreichle commented Jun 12, 2017

Should this work with woocommerce bookings? All my products are listed as a "Bookable Product" as opposed to a "Variable Product or "Simple Product". When I paste the above code nothing happens and I'm wondering if I need an extra "add_filter(..." for bookable products. I don't know PHP but I've just pasted the code towards the bottom of functions.php file. Any help is much appreciated. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment