Sometimes you may not want your customers to download their purchased files from the purchase confirmation page, but instead force them to download the files from the purchase receipt email. This quick tutorial will show you how to prevent the download links from appearing on the purchase confirmation page in Easy Digital Downloads.

It’s already possible to do this by copying over the shortcode-receipt.php¬†template from EDD and into your theme, but it requires you to remove a whole bunch of PHP. It’s much easier to do this from the edd_receipt_show_download_files¬†filter hook, which was introduced in EDD 1.8.6.

Copy and paste the following function (mind the opening PHP tag) into you child theme’s functions.php or custom plugin:

6 comments

  1. Hi Sumobi,

    I upgraded to the genesis framework and this no longer works. Well, I’m not sure. I placed it in my child theme not the actual genesis functions.php file and it did not work. Please advise.

    1. So it worked before you upgraded to the Genesis framework? Which file in your child theme did you place it in? Can you show me the entire file with the code added? Open up a support ticket with me by using my contact form if you’d like. PS, I made a plugin from this code snippet that you might like to try wordpress.org/plugins/edd-downloads-as-services/

Comments are closed.