Easy Digital Downloads allows you to display terms that the customer must accept at checkout before the purchase can be made. By clicking the show terms link, the customer can read the terms text that appears, and then click the checkbox to agree to those terms.

In some cases you might like to show your terms on a separate WordPress page, and then display a link to it, which opens in a new window.

Your first thought might be to simply hard code an HTML anchor link inside the Agree to Terms Label field, but if you don’t type any Agreement Text, the “show terms/hide terms” link will still appear.

Copy and paste the following (mind the opening PHP tag) into your child theme’s functions.php or custom plugin. Then, simply change the $page_id to the ID of your terms page.

10 comments

  1. Sumobi,
    i would like to try this but I am not clear on which functions.php file to edit in my child theme? edd/cart-functions.php? also am I meant to replace other code with the code above? if so, which bit am I replacing?

    1. The file you edit is the file called functions.php in your child theme, not cart-functions.php or anything else. If it doesn’t exist, create the file. Do not replace any code that’s already there, simply add the code above.

    1. No, you’ll need to enter the ID of your page. You can find this by hovering over the page in the admin, or by clicking the page to edit it and looking at the ID in the URL.

  2. Hey Andrew,
    This snippet broke than after upgrading to the latest versions of EDD plugins.
    Do you have an update for this code?
    Thanks very much.

  3. This is great thanks,

    I have one more question where you might be able to help. Is it also possible to add a second Terms Box to my Checkout Page? If yes, how is this done? 😀

    Thanks for this post allready!

Comments are closed.