' . wp_kses_post( $purchase_note ) . '
' : '';
}
/**
* Render order details table totals.
*
* @param \WC_Order $order Order object.
* @return string
*/
protected function render_order_details_table_totals( $order ) {
add_filter( 'woocommerce_order_shipping_to_display_shipped_via', '__return_empty_string' );
$return = '';
$total_rows = array_diff_key(
$order->get_order_item_totals(),
array(
'cart_subtotal' => '',
'payment_method' => '',
)
);
foreach ( $total_rows as $total ) {
$return .= '
' . esc_html( $total['label'] ) . '
' . wp_kses_post( $total['value'] ) . '
';
}
return $return;
}
/**
* Render customer note.
*
* @param \WC_Order $order Order object.
* @return string
*/
protected function render_order_details_customer_note( $order ) {
if ( ! $order->get_customer_note() ) {
return '';
}
return '' .
'
' .
esc_html__( 'Note:', 'woocommerce' ) .
'
' .
'
' . wp_kses( nl2br( wptexturize( $order->get_customer_note() ) ), [ 'br' => [] ] ) . '
' .
'
';
}
}