edd_add_email_tag

Add an email tag.

Description

edd_add_email_tag( (string) $tag, (callable) $description, $func ); 

Parameters (3)

0. $tag (string)
Email tag to be replace in email
1. $description (callable)
Hook to run when email tag is found
2. $func
The func.

Usage

  1. if ( !function_exists( 'edd_add_email_tag' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'easy-digital-downloads/includes/emails/class-edd-email-tags.php'; 
  3.  
  4. // Email tag to be replace in email 
  5. $tag = ''; 
  6.  
  7. // Hook to run when email tag is found 
  8. $description = null; 
  9.  
  10. // The func. 
  11. $func = null; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = edd_add_email_tag($tag, $description, $func); 
  15.  

Defined (2)

The function is defined in the following location(s).

/includes/emails/class-edd-email-tags.php  
  1. function edd_add_email_tag( $tag, $description, $func ) { 
  2. EDD()->email_tags->add( $tag, $description, $func ); 
/includes/emails/email-tags.php  
  1. function edd_add_email_tag( $tag, $description, $func ) { 
  2. EDD()->email_tags->add( $tag, $description, $func );