WC_Email_Customer_POS_Refunded_Order::trigger
Trigger.
Метод класса: WC_Email_Customer_POS_Refunded_Order{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
// private - только в коде основоного (родительского) класса $result = $this->trigger( $order_id, $partial_refund, $refund_id );
- $order_id(int) (обязательный)
- Order ID.
- $partial_refund(true|false)
- Whether it is a partial refund or a full refund.
По умолчанию: false - $refund_id(int)
- Refund ID.
По умолчанию: null
Код WC_Email_Customer_POS_Refunded_Order::trigger() WC Email Customer POS Refunded Order::trigger WC 10.0.2
private function trigger( $order_id, $partial_refund = false, $refund_id = null ) { if ( ! $order_id ) { return; } // Only trigger for POS orders. $order = wc_get_order( $order_id ); if ( ! $order || ! PointOfSaleOrderUtil::is_pos_order( $order ) ) { return; } $this->setup_locale(); $this->partial_refund = $partial_refund; $this->object = $order; $this->recipient = $this->object->get_billing_email(); $this->placeholders['{order_date}'] = wc_format_datetime( $this->object->get_date_created() ); $this->placeholders['{order_number}'] = $this->object->get_order_number(); if ( ! empty( $refund_id ) ) { $this->refund = wc_get_order( $refund_id ); } else { $this->refund = false; } 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(); }