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