Forums

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

  1. martin-oxby
    Member
    Posted 3 months 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!
    Thanks!

    Martin

    http://wordpress.org/extend/plugins/easy-digital-downloads/

  2. mordauk
    Pippin's Plugins
    Plugin Author

    Posted 3 months ago #

    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
    Member
    Posted 3 months 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,

    Martin

  4. mordauk
    Pippin's Plugins
    Plugin Author

    Posted 3 months ago #

    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.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.