WC_Email_Customer_Completed_Order::__constructpublicWC 1.0

Constructor.

Method of the class: WC_Email_Customer_Completed_Order{}

No Hooks.

Returns

null. Nothing (null).

Usage

$WC_Email_Customer_Completed_Order = new WC_Email_Customer_Completed_Order();
$WC_Email_Customer_Completed_Order->__construct();

WC_Email_Customer_Completed_Order::__construct() code WC 10.8.1

public function __construct() {
	$this->id             = 'customer_completed_order';
	$this->customer_email = true;
	$this->title          = __( 'Completed order', 'woocommerce' );
	$this->email_group    = 'order-updates';
	$this->template_html  = 'emails/customer-completed-order.php';
	$this->template_plain = 'emails/plain/customer-completed-order.php';
	$this->placeholders   = array(
		'{order_date}'   => '',
		'{order_number}' => '',
	);

	// Triggers for this email.
	add_action( 'woocommerce_order_status_completed_notification', array( $this, 'trigger' ), 10, 2 );

	// 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 that their order is complete and has been shipped', 'woocommerce' )
		: __( 'Order complete emails are sent to customers when their orders are marked completed and usually indicate that their orders have been shipped.', 'woocommerce' );

	if ( $this->block_email_editor_enabled ) {
		$this->title       = __( 'Order fulfilled', 'woocommerce' );
		$this->description = __( 'Notifies customers when their order has been shipped.', 'woocommerce' );
	}
}