WC_Email_Customer_Note::__construct
Constructor.
Method of the class: WC_Email_Customer_Note{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WC_Email_Customer_Note = new WC_Email_Customer_Note(); $WC_Email_Customer_Note->__construct();
WC_Email_Customer_Note::__construct() WC Email Customer Note:: construct code WC 10.7.0
public function __construct() {
$this->id = 'customer_note';
$this->customer_email = true;
$this->title = __( 'Customer note', 'woocommerce' );
$this->email_group = 'order-changes';
$this->template_html = 'emails/customer-note.php';
$this->template_plain = 'emails/plain/customer-note.php';
$this->placeholders = array(
'{order_date}' => '',
'{order_number}' => '',
);
// Triggers.
add_action( 'woocommerce_new_customer_note_notification', array( $this, 'trigger' ) );
// Call parent constructor.
parent::__construct();
// Must be after parent's constructor which sets `email_improvements_enabled` property.
$this->description = $this->email_improvements_enabled
? __( 'Send an email to customers notifying them when you’ve added a note to their order', 'woocommerce' )
: __( 'Customer note emails are sent when you add a note to an order.', 'woocommerce' );
if ( $this->block_email_editor_enabled ) {
$this->title = __( 'Customer note added', 'woocommerce' );
$this->description = __( 'Notifies customers when you’ve added a note to their order.', 'woocommerce' );
}
}