Show $0.00 prices as "Free" in EDD.
This file contains 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
<?php | |
/* Plugin Name: Custom Functions */ | |
function pw_format_currency( $formatted, $currency, $price ) { | |
if( ! is_admin() && $price == 0.00 ) { | |
return 'Free'; | |
} | |
return $formatted; | |
} | |
add_filter( 'edd_usd_currency_filter_before', 'pw_format_currency', 10, 3 ); |
Thanks
How to hide automatically prices that are 0.00$ ?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When this code is used, it appears that all other prices that are not 0.00 disappear from the site. Do you have a tweak for this? We have a user trying to use this code. Thanks!
Edit: https://easydigitaldownloads.com/support/topic/show-0-00-prices-as-free-in-edd/