Created
January 9, 2015 17:35
-
-
Save adampickering/20d97290f819020b8f78 to your computer and use it in GitHub Desktop.
Easy Digital Downloads - Download Label
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
<?php | |
/** | |
* Plugin Name: Easy Digital Downloads - Download Label | |
*/ | |
function astoundify_edd_purchase_link_defaults( $args ) { | |
$price = edd_get_download_price( $args['download_id'] ); | |
if ( 0 == $price ) { | |
$args[ 'text' ] = __( 'Free' ); | |
} | |
return $args; | |
} | |
add_filter( 'edd_purchase_link_defaults', 'astoundify_edd_purchase_link_defaults' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment