Developer API

edd_add_email_tag

The edd_add_email_tag() function allows you to register custom email tags for purchase receipts and admin sale notifications.

EDD_Graph

The EDD_Graph class, introduced in EDD version 1.9, is used for easily building graphs of data. For example, the earnings / sales reports graphs seen in Downloads → Reports are created using EDD_Graph. The class can be used by extensions to quickly graph any data set.

EDD_Payment_Stats

The EDD_Payment_Stats class is designed to provide a simple way to retrieve earnings and sales stats for the entire store, or specific products, for designated time periods, such as this week, last month, today, last year, etc.

EDD_USE_PHP_SESSIONS

If this constant is defined, Easy Digital Downloads will use PHP $_SESSION for storing cart data. By default, when it is not defined, EDD will use WP_Session, which is a combination of browser cookies and database rows stored in the wp_options table. Place this constant in your wp-config.php file: define( ‘EDD_USE_PHP_SESSIONS’, true );

edd_before_download_content

Runs just before the content for a single download is displayed. Usually this happens in single.php or single-download.php.

edd_after_price_options

This action runs after the closing DIV tag for the price options list for variable-price enabled Downloads. do_action( ‘edd_after_price_options’, $download_id );

edd_after_price_options_list

This action runs at the end of the price options (inside of the UL tag) list for variable-price enabled Downloads. do_action( ‘edd_after_price_options_list’, $download_id, $prices, $type );

edd_after_price_option

This action runs just after a price option is printed for variable-price enabled Downloads. do_action( ‘edd_after_price_option’, $price_id, $price_data, $download_id );

edd_before_price_options

This action runs just after the price options are outputted for variable-price enabled Downloads. do_action( ‘edd_before_price_options’, $download_id );

edd_purchase_link_end

This action runs just after the purchase link is outputted, both for the `[purchase_link]` short code and the `edd_get_purchase_link()` function. do_action( ‘edd_purchase_link_end’, $download_id );

edd_purchase_link_top

This action runs just before the purchase link is outputted, both for the `[purchase_link]` short code and the `edd_get_purchase_link()` function. do_action( ‘edd_purchase_link_top’, $download_id, $show_price );

edd_post_update_log

This action runs just after a log entry is updated. do_action( ‘edd_post_update_log’, $log_id, $log_data, $log_meta );

edd_pre_update_log

This action runs just before a log entry is updated. do_action( ‘edd_pre_update_log’, $log_id, $log_data, $log_meta );

edd_post_insert_log

This action runs just after a log entry is recorded. do_action( ‘edd_post_insert_log’, $log_id, $log_data, $log_meta );

edd_pre_insert_log

This action runs just before a log entry is recorded. do_action( ‘edd_pre_insert_log’, $log_data, $log_meta );

edd_api_output_after

This action runs just after the json/xml is printed to the screen when performing an EDD_API request. do_action( ‘edd_api_output_after’, $data, $api_object, $format );

edd_api_output_{format}

This action runs when printing the response data to the screen for a custom data format when performing an EDD_API request. do_action( ‘edd_api_output_{format}’, $data, $api_object );

edd_api_output_before

This action runs just before the json/xml is printed to the screen when performing an EDD_API request. do_action( ‘edd_api_output_before’, $data, $api_object, $format );

edd_process_verified_download

This action runs during the file download process, just after the purchase has been verified but before any headers are sent. do_action( ‘edd_process_verified_download’, $download_id, $email );

edd_post_remove_cart_discount

This action just after a discount is removed from the shopping cart. do_action( ‘edd_post_remove_cart_discount’, $discount_id );

edd_pre_remove_cart_discount

This action just before a discount is removed from the shopping cart. do_action( ‘edd_pre_remove_cart_discount’, $discount_id );

edd_post_update_discount_status

This action just after the status of a discount code is changed. do_action( ‘edd_post_update_discount_status’, $discount_id, $new_status, $old_status );

edd_pre_update_discount_status

This action just before the status of a discount code is changed. do_action( ‘edd_pre_update_discount_status’, $discount_id, $new_status, $old_status );