X

Create Custom Email Templates for Easy Digital Downloads

Custom email templates are a great way to give a consistent brand look to your emails. This snippet will let you set up custom email templates that can be used with the Easy Digital Downloads plugin.

function pw_edd_custom_email_template() {	
 
	echo '<div style="width: 550px; border: 1px solid #1e79c0; background: #ddd; padding: 8px 10px; margin: 0 auto;">';
		echo '<div id="edd-email-content" style="background: #f0f0f0; border: 1px solid #9ac7e1; padding: 10px;">';
			echo '{email}'; // this tag is required in order for the contents of the email to be shown
		echo '</div>';	
	echo '</div>';
 
}
add_action('edd_email_template_my_custom_template', 'pw_edd_custom_email_template');
 
// register the custom email template
function pw_edd_get_email_templates( $templates ) {
 
	$templates['my_custom_template'] = 'My Custom Template Name';
 
	return $templates;
}
add_filter('edd_email_templates', 'pw_edd_get_email_templates');

Comments  Leave a Reply

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!