WC_Email_Customer_POS_Refunded_Order::auto_triggerpublicWC 10.6.0

Auto-trigger this email when a POS-paid order is refunded.

Method of the class: WC_Email_Customer_POS_Refunded_Order{}

No Hooks.

Returns

null. Nothing (null).

Usage

$WC_Email_Customer_POS_Refunded_Order = new WC_Email_Customer_POS_Refunded_Order();
$WC_Email_Customer_POS_Refunded_Order->auto_trigger( $order_id, $refund_id ): void;
$order_id(int) (required)
The order ID.
$refund_id(int)
The refund ID.
Default: null

Changelog

Since 10.6.0 Introduced.

WC_Email_Customer_POS_Refunded_Order::auto_trigger() code WC 10.8.1

public function auto_trigger( $order_id, $refund_id = null ): void {
	$order = wc_get_order( $order_id );
	if ( ! $order instanceof WC_Order || ! PointOfSaleOrderUtil::is_order_paid_at_pos( $order ) ) {
		return;
	}
	$this->trigger( $order_id, $this->id, $refund_id );
}