diff --git a/includes/admin/meta-boxes/class-wc-meta-box-order-data.php b/includes/admin/meta-boxes/class-wc-meta-box-order-data.php index c742cddf3b4..ecff1a98e34 100644 --- a/includes/admin/meta-boxes/class-wc-meta-box-order-data.php +++ b/includes/admin/meta-boxes/class-wc-meta-box-order-data.php @@ -164,53 +164,59 @@ class WC_Meta_Box_Order_Data {
-
+
+

labels->singular_name ), + esc_html( $order->get_order_number() ) + ); -

labels->singular_name, - $order->get_order_number() - ); ?>

-

get_title() ) : esc_html( $payment_method ) ) - ); + $meta_list = array(); - if ( $transaction_id = $order->get_transaction_id() ) { - if ( isset( $payment_gateways[ $payment_method ] ) && ( $url = $payment_gateways[ $payment_method ]->get_transaction_url( $order ) ) ) { - $order_meta['payment_method']['transaction_id'] = '(' . esc_html( $transaction_id ) . ')'; - } else { - $order_meta['payment_method']['transaction_id'] = '(' . esc_html( $transaction_id ) . ')'; - } + if ( $payment_method ) { + /* translators: %s: payment method */ + $payment_method_string = sprintf( + __( 'Payment via %s', 'woocommerce' ), + esc_html( isset( $payment_gateways[ $payment_method ] ) ? $payment_gateways[ $payment_method ]->get_title() : $payment_method ) + ); + + if ( $transaction_id = $order->get_transaction_id() ) { + if ( isset( $payment_gateways[ $payment_method ] ) && ( $url = $payment_gateways[ $payment_method ]->get_transaction_url( $order ) ) ) { + $payment_method_string = ' (' . esc_html( $transaction_id ) . ')'; + } else { + $payment_method_string = ' (' . esc_html( $transaction_id ) . ')'; } - - if ( $order->get_date_paid() ) { - /* translators: 1: date 2: time */ - $order_meta['payment_method']['date_paid'] = sprintf( __( 'on %1$s @ %2$s', 'woocommerce' ), wc_format_datetime( $order->get_date_paid() ), wc_format_datetime( $order->get_date_paid(), get_option( 'time_format' ) ) ); - } - - $order_meta['payment_method'] = implode( ' ', $order_meta['payment_method'] ); } - if ( $ip_address = $order->get_customer_ip_address() ) { - /* translators: %s: IP address */ - $order_meta['ip_address'] = sprintf( - __( 'Customer IP: %s', 'woocommerce' ), - '' . esc_html( $ip_address ) . '' - ); - } + $meta_list[] = $payment_method_string; + } + + if ( $order->get_date_paid() ) { + /* translators: 1: date 2: time */ + $meta_list[] = sprintf( + __( 'Paid on %1$s @ %2$s', 'woocommerce' ), + wc_format_datetime( $order->get_date_paid() ), + wc_format_datetime( $order->get_date_paid(), get_option( 'time_format' ) ) + ); + } + + if ( $ip_address = $order->get_customer_ip_address() ) { + /* translators: %s: IP address */ + $meta_list[] = sprintf( + __( 'Customer IP: %s', 'woocommerce' ), + '' . esc_html( $ip_address ) . '' + ); + } + + echo wp_kses_post( implode( '. ', $meta_list ) ) . '.'; - echo implode( '. ', $order_meta ); ?>

-