Automattic\WooCommerce\Blocks\BlockTypes\OrderConfirmation
Totals::render_order_details_customer_note()
Render customer note.
Method of the class: Totals{}
No Hooks.
Return
String
.
Usage
// protected - for code of main (parent) or child class $result = $this->render_order_details_customer_note( $order );
- $order(\WC_Order) (required)
- Order object.
Totals::render_order_details_customer_note() Totals::render order details customer note code WC 9.4.2
protected function render_order_details_customer_note( $order ) { if ( ! $order->get_customer_note() ) { return ''; } return '<div class="wc-block-order-confirmation-order-note">' . '<p class="wc-block-order-confirmation-order-note__label">' . esc_html__( 'Note:', 'woocommerce' ) . '</p>' . '<p>' . wp_kses( nl2br( wptexturize( $order->get_customer_note() ) ), [] ) . '</p>' . '</div>'; }