WordPress at Your Fingertips
function is not described

WC_Email_Customer_Note::trigger() public WC 1.0

Trigger.

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

No Hooks.

Return

null. Nothing.

Usage

$WC_Email_Customer_Note = new WC_Email_Customer_Note();
$WC_Email_Customer_Note->trigger( $args );
$args(array) (required)
Email arguments.

Code of WC_Email_Customer_Note::trigger() WC 5.9.0

public function trigger( $args ) {
	$this->setup_locale();

	if ( ! empty( $args ) ) {
		$defaults = array(
			'order_id'      => '',
			'customer_note' => '',
		);

		$args = wp_parse_args( $args, $defaults );

		$order_id      = $args['order_id'];
		$customer_note = $args['customer_note'];

		if ( $order_id ) {
			$this->object = wc_get_order( $order_id );

			if ( $this->object ) {
				$this->recipient                      = $this->object->get_billing_email();
				$this->customer_note                  = $customer_note;
				$this->placeholders['{order_date}']   = wc_format_datetime( $this->object->get_date_created() );
				$this->placeholders['{order_number}'] = $this->object->get_order_number();
			}
		}
	}

	if ( $this->is_enabled() && $this->get_recipient() ) {
		$this->send( $this->get_recipient(), $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
	}

	$this->restore_locale();
}