WC_Email_Customer_Review_Request::__constructpublicWC 1.0

Constructor.

Method of the class: WC_Email_Customer_Review_Request{}

No Hooks.

Returns

null. Nothing (null).

Usage

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

WC_Email_Customer_Review_Request::__construct() code WC 10.8.1

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

	// Trigger fires via WC_Emails' transactional pipeline after Action Scheduler fires `woocommerce_send_review_request`.
	add_action( 'woocommerce_send_review_request_notification', array( $this, 'trigger' ), 10, 1 );

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

	// Must be after parent's constructor which sets `email_improvements_enabled` property.
	$this->description = __( 'Review request emails are sent to customers a few days after their order is complete, inviting them to leave reviews for the products they purchased.', 'woocommerce' );

	if ( $this->block_email_editor_enabled ) {
		$this->description = __( 'Invites customers to review the products from their completed order.', 'woocommerce' );
	}
}