'; $content .= $this->render_summary_row( __( 'Order #:', 'woocommerce' ), $order->get_order_number() ); $content .= $this->render_summary_row( __( 'Date:', 'woocommerce' ), wc_format_datetime( $order->get_date_created() ) ); $content .= $this->render_summary_row( __( 'Total:', 'woocommerce' ), $order->get_formatted_order_total() ); $content .= $this->render_summary_row( __( 'Email:', 'woocommerce' ), $order->get_billing_email() ); $content .= $this->render_summary_row( __( 'Payment:', 'woocommerce' ), $order->get_payment_method_title() ); $content .= ''; return $content; } /** * Render row in the order summary. * * @param string $name name of row. * @param string $value value of row. * @return string */ protected function render_summary_row( $name, $value ) { return $value ? '
  • ' . esc_html( $name ) . ' ' . wp_kses_post( $value ) . '
  • ' : ''; } }