Skip to content

Instantly share code, notes, and snippets.

@amdrew
Last active March 22, 2016 02:35
Show Gist options
  • Save amdrew/7225903 to your computer and use it in GitHub Desktop.
Save amdrew/7225903 to your computer and use it in GitHub Desktop.
Add to cart links in EDD
<!-- As indicated by the docs https://easydigitaldownloads.com/docs/creating-custom-add-to-cart-links/ -->
<a href="http://yoururl.com/checkout?edd_action=add_to_cart&download_id=ID_OF_THE_DOWNLOAD">Purchase This</a>
<!-- Following the docs, this doesn't work and adds the download twice -->
<!-- URL looks like this http://eddsupport.sumobithemes.dev/checkout?edd_action=add_to_cart&download_id=10 -->
<a href="http://eddsupport.sumobithemes.dev/checkout?edd_action=add_to_cart&amp;download_id=10">Buy Now</a>
<!--This does work - note the / after checkout -->
<!-- URL looks like this http://eddsupport.sumobithemes.dev/checkout/?edd_action=add_to_cart&download_id=10 -->
<a href="http://eddsupport.sumobithemes.dev/checkout/?edd_action=add_to_cart&amp;download_id=10">$10 - Buy Now!</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment