Skip to content

Instantly share code, notes, and snippets.

@amdrew
amdrew / gist:7225903
Last active March 22, 2016 02:35
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 -->