Last active
January 4, 2016 07:39
-
-
Save amdrew/8589513 to your computer and use it in GitHub Desktop.
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 | |
// remove the standard button that shows after the download's content | |
remove_action( 'edd_after_download_content', 'edd_append_purchase_link' ); | |
// our own function to output the button | |
function sumobi_edd_append_purchase_link( $download_id ) { | |
if ( ! get_post_meta( $download_id, '_edd_hide_purchase_link', true ) ) { | |
echo edd_get_purchase_link( | |
array( | |
'download_id' => $download_id, | |
'class' => 'edd-submit my-new-class', // add your new classes here | |
'price' => 0 // turn the price off | |
) | |
); | |
} | |
} | |
// rehook/add our function back to the same location as before | |
add_action( 'edd_after_download_content', 'sumobi_edd_append_purchase_link' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment