Skip to main content
Easy Digital Downloads Documentation
Documentation, Reference Materials, and Tutorials for Easy Digital Downloads

Developer’s Intro to Easy Digital Downloads

Easy Digital Downloads has been built with developers in mind, which means that all of the code is well laid out, organized, easy to read, and documented. The source code for EDD is also highly extensible, which makes it extremely easy for developers to hook in their own pieces of functionality, or modify existing parts.

If you are looking to do development on EDD, either by contributing to the core plugin or by creating extensions, there are a few things you should familiarize yourself with before you begin.

Github – Bug and Enhancement Tracking

The entire source for Easy Digital Downloads is available on
Github, and this is also where all main bug / enhancement tracking takes place. If you have developer-specific questions, it is best to create an Issue instead of leaving a comment here on this site. If you have an enhancement you would like to propose, Github is also the place to post it.

Organization

EDD’s source code is organized into separate, meaningfully named files. For example, all functions that relate to discount codes are placed in a file called ”
discount-functions.php“. If you are to do development work on EDD, then you are expected to follow the organization and naming convention that is already in place. If you create a new function that has to do with 3rd party plugin compatibility, you will place it into the “plugin-compatibility.php” file.

Function and Class Naming

Organization is one of the most important, but an equally important key to remember is naming. All functions, without exception, are prefixed with
edd_. This helps us ensure we do not create functions with conflicting names with other plugins or themes. For example, do not create a function named like this:

function get_download_details() {
	// do stuff here
}

Do this instead:

function edd_get_download_details() {
	// do stuff here
}

You should also take care to ensure you have named your function appropriately, and that a function does not already exist to do what you need.

Classes should follow the same rules.

Follow WordPress Standards

We work hard to make sure EDD follows the best coding standards, and we expect you to do the same. If you need assistance in learning some of the standards we expect of you, please consult the official 
WordPress Coding Standards codex.

Submitting Your Code

If you have written an add-on,
contact us to discuss getting it listed and possibly selling it on the site. If you are making a contribution to the core source code, please submit a Pull Request on the plugin’s Github page.

Development Blog

The
Easy Digital Downloads development blog is the best place to keep informed of important changes, announcements, and developer guidance relating to EDD. If you develop extensions or do any kind of development relating to EDD, we highly recommend subscribing to the development blog.