WC_Gateway_Cheque::email_instructions
Add content to the WC emails.
Метод класса: WC_Gateway_Cheque{}
Хуки из метода
Возвращает
null. Ничего (null).
Использование
$WC_Gateway_Cheque = new WC_Gateway_Cheque(); $WC_Gateway_Cheque->email_instructions( $order, $sent_to_admin, $plain_text );
- $order(WC_Order) (обязательный)
- Order object.
- $sent_to_admin(true|false) (обязательный)
- Sent to admin.
- $plain_text(true|false)
- Email format: plain text or HTML.
По умолчанию:false
Код WC_Gateway_Cheque::email_instructions() WC Gateway Cheque::email instructions WC 11.2.2
public function email_instructions( $order, $sent_to_admin, $plain_text = false ) {
if ( $this->instructions && ! $sent_to_admin && self::ID === $order->get_payment_method() ) {
/**
* Filter the email instructions order status.
*
* @since 7.4
*
* @param string $status The default status.
* @param object $order The order object.
*/
$instructions_order_status = apply_filters( 'woocommerce_cheque_email_instructions_order_status', OrderStatus::ON_HOLD, $order );
if ( $order->has_status( $instructions_order_status ) ) {
echo wp_kses_post( wpautop( wptexturize( $this->instructions ) ) . PHP_EOL );
}
}
}