Skip to content

Instantly share code, notes, and snippets.

@dryan1144
Last active November 27, 2020 19:44
Show Gist options
  • Save dryan1144/a7d96f84557a880488c0b750291b6368 to your computer and use it in GitHub Desktop.
Save dryan1144/a7d96f84557a880488c0b750291b6368 to your computer and use it in GitHub Desktop.
<?php
/***
Add custom email tags for use in EDD email templates
***/
function drw_edd_add_email_tags() {
edd_add_email_tag('product_message', __('Custom product message','drw'), 'drw_product_message_email_tag');
edd_add_email_tag('product_message_2', __('Another product message','drw'), 'drw_product_message_2_email_tag');
}
add_action('edd_add_email_tags', 'feti_edd_add_email_tags');
/***
The {product_message} email tag
***/
function drw_product_message_email_tag( $payment_id ) {
$payment_data = edd_get_payment_meta( $payment_id );
$email_tag_content = __('This is a custom message','drw');
return $email_tag_content;
}
/***
The {product_message_2} email tag
***/
function drw_product_message_email_tag( $payment_id ) {
$email_tag_content = __('This is a another custom message','drw');
return $email_tag_content;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment