• Anonymous User 11187416

    (@anonymized-11187416)


    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/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Pippin Williamson

    (@mordauk)

    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)?

    Thread Starter Anonymous User 11187416

    (@anonymized-11187416)

    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

    Plugin Contributor Pippin Williamson

    (@mordauk)

    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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Get File URL based on slug?’ is closed to new replies.