WordPress at Your Fingertips
function is not described

WC_Email_New_Order::__construct() public WC 1.0

Constructor.

{} It's a method of the class: WC_Email_New_Order{}

No Hooks.

Return

null. Nothing.

Usage

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

Code of WC_Email_New_Order::__construct() WC 5.9.0

public function __construct() {
	$this->id             = 'new_order';
	$this->title          = __( 'New order', 'woocommerce' );
	$this->description    = __( 'New order emails are sent to chosen recipient(s) when a new order is received.', 'woocommerce' );
	$this->template_html  = 'emails/admin-new-order.php';
	$this->template_plain = 'emails/plain/admin-new-order.php';
	$this->placeholders   = array(
		'{order_date}'   => '',
		'{order_number}' => '',
	);

	// Triggers for this email.
	add_action( 'woocommerce_order_status_pending_to_processing_notification', array( $this, 'trigger' ), 10, 2 );
	add_action( 'woocommerce_order_status_pending_to_completed_notification', array( $this, 'trigger' ), 10, 2 );
	add_action( 'woocommerce_order_status_pending_to_on-hold_notification', array( $this, 'trigger' ), 10, 2 );
	add_action( 'woocommerce_order_status_failed_to_processing_notification', array( $this, 'trigger' ), 10, 2 );
	add_action( 'woocommerce_order_status_failed_to_completed_notification', array( $this, 'trigger' ), 10, 2 );
	add_action( 'woocommerce_order_status_failed_to_on-hold_notification', array( $this, 'trigger' ), 10, 2 );
	add_action( 'woocommerce_order_status_cancelled_to_processing_notification', array( $this, 'trigger' ), 10, 2 );
	add_action( 'woocommerce_order_status_cancelled_to_completed_notification', array( $this, 'trigger' ), 10, 2 );
	add_action( 'woocommerce_order_status_cancelled_to_on-hold_notification', array( $this, 'trigger' ), 10, 2 );

	// Call parent constructor.
	parent::__construct();

	// Other settings.
	$this->recipient = $this->get_option( 'recipient', get_option( 'admin_email' ) );
}