Retroactive License Emails

/** * Initialize the plugin when an ajax call is made by the retroactive license * generation process. We don’t want to send out a duplicate email during the * normal purchase process, so this way the plugin does nothing…Continue reading

License Keys UL – Email Tag for Software Licensing

if ( ! defined( ‘ABSPATH’ ) ) exit; function my_custom_sl_emails_initialize(){ if ( class_exists( ‘EDD_SL_Emails’ ) ) { edd_add_email_tag( ‘license_keys_ul’, __( ‘Show all purchased licenses in an unordered list’, ‘edd_sl’ ), ‘my_custom_license_keys_ul_tag’ ); } } add_action( ‘init’, ‘my_custom_sl_emails_initialize’ ); function my_custom_license_keys_ul_tag(…Continue reading

Disable Renewal Notice for Specific Products

// Disables renewal notices for specific products function pw_edd_disable_product_renewal_notice( $should_send, $license_id, $notice_id ) { $download_id = (int) edd_software_licensing()->get_download_id( $license_id ); $price_id = (int) edd_software_licensing()->get_price_id( $license_id ); if( 55 === $download_id ) { // Do not send for download with an…Continue reading

Readme.txt Parsing Enhancements

function jp_edd_readme_filter( $response, $download, $readme ) { // Update the current version number for a download $meta_version = get_post_meta( $download->ID, ‘_edd_sl_version’, true ); if ( ” != $readme[‘stable_tag’] && $meta_version != $readme[‘stable_tag’] ) { update_post_meta( $download->ID, ‘_edd_sl_version’, $readme[‘stable_tag’] ); }…Continue reading

Remove Manage Sites

function kjm_remove_manage_sites_link() { if ( isset( $_GET[‘action’] ) && $_GET[‘action’] == ‘manage_licenses’ ) { add_filter( ‘edd_sl_force_activation_increase’, ‘__return_true’ ); } } add_action( ‘wp_head’, ‘kjm_remove_manage_sites_link’ );Continue reading

Disable Renewals for Specific Products

/** * Prevent licenses from being renewed for certain products. * * @param bool $can_renew * @param int $license_id * * @return bool */ function ag_edd_sl_can_renew( $can_renew, $license_id ) { // Bail if they already can’t renew. if ( !…Continue reading

Modify Software Licensing License Structure

// Prepend/append text to license keys function custom_edd_license_usernam_date_md5( $key, $license_id, $download_id, $payment_id, $cart_index ) { $prepend = ‘prepend’; $license = md5( $license_id ); $append = ‘append’; $key = $prepend . ‘_’ . $license . ‘_’ . $append; return $key; }…Continue reading

Variable Pricing License Expiration

/** * Below are two different filters: one to modify the unit (months, years, or days), and another * to modify the length. They are used together to build a full billing cycle for that price ID. * So if…Continue reading

Retroactive Lifetime Licenses

/** * Add a metabox to initiate the action */ function eddrll_add_metabox() { $post_types = apply_filters( ‘edd_download_metabox_post_types’, array( ‘download’ ) ); foreach ( $post_types as $post_type ) { add_meta_box( ‘edd_retroactive_lifetime_licenses’, __( ‘Retroactive Lifetime Licenses’, ‘edd-retroactive-lifetime-licenses’ ), ‘eddrll_render_metabox’, $post_type, ‘advanced’, ‘low’…Continue reading