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

Override Commissions Email Template

// Remove default email template remove_action( ‘eddc_insert_commission’, ‘eddc_email_alert’, 10, 5 ); // Build New email template for Commissions (same as default, carefully make your modifications) function sd_edd_commissions_email_alert( $user_id, $commission_amount, $rate, $download_id, $commission_id ) { global $edd_options; $from_name = isset( $edd_options[‘from_name’]…Continue reading

Commissions payment_id email tag

function pj_eddc_add_payment_id_email_template_tag( $message, $user_id, $commission_amount, $rate, $download_id, $commission_id ){ //Get the payment Id $payment_id = get_post_meta( $commission_id, ‘_edd_commission_payment_id’, true ); $message = str_replace( ‘{payment_id}’, $payment_id, $message ); return $message; } add_filter( ‘eddc_sale_alert_email’, ‘pj_eddc_add_payment_id_email_template_tag’, 10, 6 );Continue reading

Billing Address Email Tag – Actual Country Name

function pj_edd_billing_address_tag( $payment_id ) { edd_remove_email_tag( ‘billing_address’ ); edd_add_email_tag( ‘billing_address’, __( ‘The buyer\’s billing address’, ‘easy-digital-downloads’ ), ‘pj_edd_billing_address_tag_callback’ ); } add_action( ‘edd_add_email_tags’, ‘pj_edd_billing_address_tag’, 99 ); function pj_edd_billing_address_tag_callback( $payment_id ) { $user_info = edd_get_payment_meta_user_info( $payment_id ); $user_address = ! empty( $user_info[‘address’]…Continue reading

Add PDF to purchase receipt

/** * * @param array $attachments required Any existing attachments * @param int $payment_id optional ID of the current payment * @param array $payment_data optional The remaining payment data * @return array $attachments Now our attachment is added */ function…Continue reading