Skip to content

Instantly share code, notes, and snippets.

@cklosowski
Created April 6, 2014 20:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cklosowski/10011065 to your computer and use it in GitHub Desktop.
Save cklosowski/10011065 to your computer and use it in GitHub Desktop.
EDD - No Price on Free Download
<?php
add_filter( 'edd_purchase_link_defaults', 'ck_edd_edd_purchase_link_defaults', 10, 1 );
function ck_edd_edd_purchase_link_defaults( $args ) {
if ( edd_get_download_price( $args['download_id'] ) == '0.00' )
$args['price'] = false;
return $args;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment