Ready to get started?Download WordPress


Easy Digital Downloads
Get File URL based on slug? (4 posts)

  1. martin-oxby
    Posted 1 year ago #

    Hi there,

    I'm implementing EDD on a client's site, all going well so far. However I would like to be able to get the download file URL through a WP function?

    Just trying to add a bit of additional functionality, but it will be useless without obtaining the file URL!



  2. Do you want to get the secure download file URL (given after a purchase) or a plain download URL (the one entered in the Download Configuration box)?

  3. martin-oxby
    Posted 1 year ago #

    I guess it would make sense to get the secure download one as

    1. Entered directly without a purchase won't permit download
    2. The site should have the right to use its own files (on its own domain), am I right?

    Whereas providing the plain download URL could open up the site to files being downloaded without purchasing, which sort of defeats the purpose.

    Thanks in Advance,


  4. Great, thank you for clarifying. The function you want to use is edd_get_download_file_url(), which you can see the complete definition for here: https://github.com/pippinsplugins/Easy-Digital-Downloads/blob/master/includes/download-functions.php#L778

    Let me know if you have questions about the parameters.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.