Besides being straightforward and lightweight, Easy Digital Downloads has, in my opinion, the most developer-friendly code of all the WordPress ecommerce plugin ecosystems. Here are the hooks I use the most when working on projects as a freelance Easy Digital Downloads developer.
Jump straight to the code examples, or look through the various action and filters below.
Purchase Actions
These actions can be used to send purchase data to 3rd party APIs, or integrate with other areas of the same site. Useful classes to look at when using these hooks are EDD_Payment, EDD_Customer, and EDD_Download.
Checkout actions can be used to output text on the checkout page (without editing template files), or can be used to control products being added to the cart as shown in the code example below.
edd_is_discount_valid
edd_purchase_form_before_submit
edd_before_checkout_cart
edd_pre_add_to_cart
Email and Receipt Content
Adding custom placeholder tags to emails and creating custom receipt content are powerful ways to extend EDD and control the checkout experience.
Use functions.php or a create a functionality plugin to utilize the code examples below.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters