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 96f4d7a96e2..c742cddf3b4 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 @@ -174,38 +174,41 @@ class WC_Meta_Box_Order_Data { $order->get_order_number() ); ?> -

get_title() ) : esc_html( $payment_method ) ) ); if ( $transaction_id = $order->get_transaction_id() ) { - if ( isset( $payment_gateways[ $payment_method ] ) && ( $url = $payment_gateways[ $payment_method ]->get_transaction_url( $order ) ) ) { - echo ' (' . esc_html( $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 { - echo ' (' . esc_html( $transaction_id ) . ')'; + $order_meta['payment_method']['transaction_id'] = '(' . esc_html( $transaction_id ) . ')'; } } if ( $order->get_date_paid() ) { /* translators: 1: date 2: time */ - printf( ' ' . __( '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']['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' ) ) ); } - echo '. '; + $order_meta['payment_method'] = implode( ' ', $order_meta['payment_method'] ); } if ( $ip_address = $order->get_customer_ip_address() ) { /* translators: %s: IP address */ - printf( + $order_meta['ip_address'] = sprintf( __( 'Customer IP: %s', 'woocommerce' ), '' . esc_html( $ip_address ) . '' ); } + + echo implode( '. ', $order_meta ); ?>