WC_Gateway_BACS::email_instructions
Add content to the WC emails.
Method of the class: WC_Gateway_BACS{}
Hooks from the method
Returns
null. Nothing (null).
Usage
$WC_Gateway_BACS = new WC_Gateway_BACS(); $WC_Gateway_BACS->email_instructions( $order, $sent_to_admin, $plain_text );
- $order(WC_Order) (required)
- Order object.
- $sent_to_admin(true|false) (required)
- Sent to admin.
- $plain_text(true|false)
- Email format: plain text or HTML.
Default:false
WC_Gateway_BACS::email_instructions() WC Gateway BACS::email instructions code WC 10.5.0
public function email_instructions( $order, $sent_to_admin, $plain_text = false ) {
if ( ! $sent_to_admin && self::ID === $order->get_payment_method() ) {
/**
* Filter the email instructions order status.
*
* @since 7.4
*
* @param string $terms The order status.
* @param object $order The order object.
*/
$instructions_order_status = apply_filters( 'woocommerce_bacs_email_instructions_order_status', OrderStatus::ON_HOLD, $order );
if ( $order->has_status( $instructions_order_status ) ) {
if ( $this->instructions ) {
echo wp_kses_post( wpautop( wptexturize( $this->instructions ) ) . PHP_EOL );
}
$this->bank_details( $order->get_id() );
}
}
}