Created
July 7, 2015 13:28
-
-
Save WillBrubaker/deb149a1da3adeebe5af to your computer and use it in GitHub Desktop.
Replace 'Free' from WooCommerce Booking price string
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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$