Skip to content

Instantly share code, notes, and snippets.

@amdrew
Last active January 3, 2016 18:19
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 amdrew/8501829 to your computer and use it in GitHub Desktop.
Save amdrew/8501829 to your computer and use it in GitHub Desktop.
Filter EDD Hide Download's redirect when "Disable direct access to this download" is enabled
<?php
function sumobi_custom_edd_hide_download_redirect( $url ) {
$url = get_permalink( '8' ); // redirect to another download, post or page
return $url;
}
add_filter( 'edd_hide_download_redirect', 'sumobi_custom_edd_hide_download_redirect' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment