Skip to content

Instantly share code, notes, and snippets.

@WillBrubaker
Created July 7, 2015 13:28
Show Gist options
  • Save WillBrubaker/deb149a1da3adeebe5af to your computer and use it in GitHub Desktop.
Save WillBrubaker/deb149a1da3adeebe5af to your computer and use it in GitHub Desktop.
Replace 'Free' from WooCommerce Booking price string
add_filter( 'woocommerce_get_price_html', 'wooninja_free_price_replace', 99, 2 );
function wooninja_free_price_replace( $price_html, $product ) {
if ( 'booking' == $product->product_type ) {
$price_html = str_replace( 'Free', 'MY REPLACEMENT', $price_html );
}
return $price_html;
}
@ErkanOzdemir
Copy link

ErkanOzdemir commented Aug 30, 2016

Thank you so much, you saved my day and probaply me from a sleepless night

do you have any idea how i can change also the price of the product in the cart? so the cart should say some text instead of 0$

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