Created
January 15, 2016 17:44
-
-
Save SeanChDavis/b3b5494c8fc7fbd4209a to your computer and use it in GitHub Desktop.
EDD replace $0.00 with Free
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 // DO NOT COPY THIS LINE | |
function jp_filter_edd_price( $formatted_price, $download_id, $price, $price_id ) { | |
if( ! edd_has_variable_prices( $download_id ) && 0 == $price ) { | |
$formatted_price = '<span class="edd_price" id="edd_price_' . $download_id . '">Free</span>'; | |
} | |
return $formatted_price; | |
} | |
add_filter( 'edd_download_price_after_html', 'jp_filter_edd_price', 10, 4 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment