WC_GZD_Email_Customer_Revocation

Revocation conformation Email.

Defined (1)

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

/includes/emails/class-wc-gzd-email-customer-revocation.php  
  1. class WC_GZD_Email_Customer_Revocation extends WC_Email { 
  2.  
  3. /** 
  4. * Constructor 
  5. * @access public 
  6. * @return void 
  7. */ 
  8. function __construct() { 
  9.  
  10. $this->id = 'customer_revocation'; 
  11. $this->title = __( 'Revocation', 'woocommerce-germanized' ); 
  12. $this->description = __( 'Email being sent if a customer fills out the revocation form.', 'woocommerce-germanized' ); 
  13.  
  14. $this->template_html = 'emails/customer-revocation.php'; 
  15. $this->template_plain = 'emails/plain/customer-revocation.php'; 
  16.  
  17. $this->subject = __( 'Your Revocation', 'woocommerce-germanized' ); 
  18. $this->heading = __( 'Your Revocation', 'woocommerce-germanized' ); 
  19.  
  20. // Call parent constuctor 
  21. parent::__construct(); 
  22.  
  23. $this->customer_email = true; 
  24.  
  25. /** 
  26. * trigger function. 
  27. * @access public 
  28. * @return void 
  29. */ 
  30. function trigger( $user_data = array() ) { 
  31.  
  32. if ( !empty( $user_data['address_mail'] ) ) { 
  33. $this->object = $user_data; 
  34. $this->user_email = $user_data['address_mail']; 
  35. if ( !empty( $user_data['mail'] ) ) 
  36. $this->user_email = $user_data['mail']; 
  37. $this->recipient = $this->user_email; 
  38.  
  39. if ( ! $this->is_enabled() || ! $this->get_recipient() ) 
  40. return; 
  41.  
  42. $this->send( $this->get_recipient(), $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() ); 
  43.  
  44. /** 
  45. * get_content_html function. 
  46. * @access public 
  47. * @return string 
  48. */ 
  49. function get_content_html() { 
  50. ob_start(); 
  51. wc_get_template( $this->template_html, array( 
  52. 'user' => $this->object,  
  53. 'email_heading' => $this->get_heading(),  
  54. 'blogname' => $this->get_blogname(),  
  55. 'sent_to_admin' => false,  
  56. 'plain_text' => false,  
  57. 'email' => $this 
  58. ) ); 
  59. return ob_get_clean(); 
  60.  
  61. /** 
  62. * get_content_plain function. 
  63. * @access public 
  64. * @return string 
  65. */ 
  66. function get_content_plain() { 
  67. ob_start(); 
  68. wc_get_template( $this->template_plain, array( 
  69. 'user' => $this->object,  
  70. 'email_heading' => $this->get_heading(),  
  71. 'blogname' => $this->get_blogname(),  
  72. 'sent_to_admin' => false,  
  73. 'plain_text' => true,  
  74. 'email' => $this 
  75. ) ); 
  76. return ob_get_clean();