WC_GZD_Email_Customer_Paid_For_Order

EKomi Review Reminder Email.

Defined (1)

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

/includes/emails/class-wc-gzd-email-customer-paid-for-order.php  
  1. class WC_GZD_Email_Customer_Paid_For_Order extends WC_Email { 
  2.  
  3. /** 
  4. * Constructor 
  5. */ 
  6. function __construct() { 
  7.  
  8. $this->id = 'customer_paid_for_order'; 
  9. $this->customer_email = true; 
  10. $this->title = __( 'Paid for order', 'woocommerce-germanized' ); 
  11. $this->description = __( 'This E-Mail is being sent to a customer after the order has been paid.', 'woocommerce-germanized' ); 
  12.  
  13. $this->heading = __( 'Payment received', 'woocommerce-germanized' ); 
  14. $this->subject = __( 'Payment received for order {order_number}', 'woocommerce-germanized' ); 
  15.  
  16. $this->template_html = 'emails/customer-paid-for-order.php'; 
  17. $this->template_plain = 'emails/plain/customer-paid-for-order.php'; 
  18.  
  19. // Triggers for this email 
  20. add_action( 'woocommerce_order_status_pending_to_processing_notification', array( $this, 'trigger' ), 30 ); 
  21.  
  22. // Call parent constuctor 
  23. parent::__construct(); 
  24.  
  25. /** 
  26. * trigger function. 
  27. * @access public 
  28. * @return void 
  29. */ 
  30. public function trigger( $order_id ) { 
  31.  
  32. if ( $order_id ) { 
  33. $this->object = wc_get_order( $order_id ); 
  34. $this->recipient = wc_gzd_get_crud_data( $this->object, 'billing_email' ); 
  35.  
  36. $this->find['order-number'] = '{order_number}'; 
  37. $this->replace['order-number'] = $this->object->get_order_number(); 
  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. 
  46. * @access public 
  47. * @return string 
  48. */ 
  49. public function get_content_html() { 
  50. return wc_get_template_html( $this->template_html, array( 
  51. 'order' => $this->object,  
  52. 'email_heading' => $this->get_heading(),  
  53. 'sent_to_admin' => false,  
  54. 'plain_text' => false,  
  55. 'email' => $this 
  56. ) ); 
  57.  
  58. /** 
  59. * Get content plain. 
  60. * @access public 
  61. * @return string 
  62. */ 
  63. public function get_content_plain() { 
  64. return wc_get_template_html( $this->template_plain, array( 
  65. 'order' => $this->object,  
  66. 'email_heading' => $this->get_heading(),  
  67. 'sent_to_admin' => false,  
  68. 'plain_text' => true,  
  69. 'email' => $this 
  70. ) ); 
  71.