title: display order product name in my account of Woocommerce
body: <p>I am using Woocommerce 3.06. My question is that how can I show Product Name in my order instead of just order number. Instead of order number I want it to show name of the product purchased so that customers can easily track status of items.</p>
  
  <p>Below is the code of my-order.php file from Woocommerce.</p>
  
  <pre><code>    &lt;?php
  /**
   * My Orders
   *
   * @deprecated  2.6.0 this template file is no longer used. My Account shortcode uses orders.php.
   */
  
  if ( ! defined( 'ABSPATH' ) ) {
      exit;
  }
  
  $my_orders_columns = apply_filters( 'woocommerce_my_account_my_orders_columns', array(
      'order-number'  =&gt; __( 'Order', 'woocommerce' ),
      'order-date'    =&gt; __( 'Date', 'woocommerce' ),
      'order-status'  =&gt; __( 'Status', 'woocommerce' ),
      'order-total'   =&gt; __( 'Total', 'woocommerce' ),
      'order-actions' =&gt; '&amp;nbsp;',
  ) );
  
  $customer_orders = get_posts( apply_filters( 'woocommerce_my_account_my_orders_query', array(
      'numberposts' =&gt; $order_count,
      'meta_key'    =&gt; '_customer_user',
      'meta_value'  =&gt; get_current_user_id(),
      'post_type'   =&gt; wc_get_order_types( 'view-orders' ),
      'post_status' =&gt; array_keys( wc_get_order_statuses() ),
  ) ) );
  
  
  if ( $customer_orders ) : ?&gt;
  
      &lt;h2&gt;&lt;?php echo apply_filters( 'woocommerce_my_account_my_orders_title', __( 'Recent orders', 'woocommerce' ) ); ?&gt;&lt;/h2&gt;
  
      &lt;table class="shop_table shop_table_responsive my_account_orders"&gt;
  
          &lt;thead&gt;
              &lt;tr&gt;
                  &lt;?php foreach ( $my_orders_columns as $column_id =&gt; $column_name ) : ?&gt;
                      &lt;th class="&lt;?php echo esc_attr( $column_id ); ?&gt;"&gt;&lt;span class="nobr"&gt;&lt;?php echo esc_html( $column_name ); ?&gt;&lt;/span&gt;&lt;/th&gt;
                  &lt;?php endforeach; ?&gt;
              &lt;/tr&gt;
          &lt;/thead&gt;
  
          &lt;tbody&gt;
              &lt;?php foreach ( $customer_orders as $customer_order ) :
                  $order      = wc_get_order( $customer_order );
                  $item_count = $order-&gt;get_item_count();
                  ?&gt;
                  &lt;tr class="order"&gt;
                      &lt;?php foreach ( $my_orders_columns as $column_id =&gt; $column_name ) : ?&gt;
                          &lt;td class="&lt;?php echo esc_attr( $column_id ); ?&gt;" data-title="&lt;?php echo esc_attr( $column_name ); ?&gt;"&gt;
                              &lt;?php if ( has_action( 'woocommerce_my_account_my_orders_column_' . $column_id ) ) : ?&gt;
                                  &lt;?php do_action( 'woocommerce_my_account_my_orders_column_' . $column_id, $order ); ?&gt;
  
                              &lt;?php elseif ( 'order-number' === $column_id ) : ?&gt;
                                  &lt;a href="&lt;?php echo esc_url( $order-&gt;get_view_order_url() ); ?&gt;"&gt;
                                      &lt;?php echo _x( '#', 'hash before order number', 'woocommerce' ) . $order-&gt;get_order_number(); ?&gt;
                                  &lt;/a&gt;
  
                              &lt;?php elseif ( 'order-date' === $column_id ) : ?&gt;
                                  &lt;time datetime="&lt;?php echo esc_attr( $order-&gt;get_date_created()-&gt;date( 'c' ) ); ?&gt;"&gt;&lt;?php echo esc_html( wc_format_datetime( $order-&gt;get_date_created() ) ); ?&gt;&lt;/time&gt;
  
                              &lt;?php elseif ( 'order-status' === $column_id ) : ?&gt;
                                  &lt;?php echo esc_html( wc_get_order_status_name( $order-&gt;get_status() ) ); ?&gt;
  
                              &lt;?php elseif ( 'order-total' === $column_id ) : ?&gt;
                                  &lt;?php
                                  /* translators: 1: formatted order total 2: total order items */
                                  printf( _n( '%1$s for %2$s item', '%1$s for %2$s items', $item_count, 'woocommerce' ), $order-&gt;get_formatted_order_total(), $item_count );
                                  ?&gt;
  
                              &lt;?php elseif ( 'order-actions' === $column_id ) : ?&gt;
                                  &lt;?php
                                      $actions = array(
                                          'pay'    =&gt; array(
                                              'url'  =&gt; $order-&gt;get_checkout_payment_url(),
                                              'name' =&gt; __( 'Pay', 'woocommerce' ),
                                          ),
                                          'view'   =&gt; array(
                                              'url'  =&gt; $order-&gt;get_view_order_url(),
                                              'name' =&gt; __( 'View', 'woocommerce' ),
                                          ),
                                          'cancel' =&gt; array(
                                              'url'  =&gt; $order-&gt;get_cancel_order_url( wc_get_page_permalink( 'myaccount' ) ),
                                              'name' =&gt; __( 'Cancel', 'woocommerce' ),
                                          ),
                                      );
  
                                      if ( ! $order-&gt;needs_payment() ) {
                                          unset( $actions['pay'] );
                                      }
  
                                      if ( ! in_array( $order-&gt;get_status(), apply_filters( 'woocommerce_valid_order_statuses_for_cancel', array( 'pending', 'failed' ), $order ) ) ) {
                                          unset( $actions['cancel'] );
                                      }
  
                                      if ( $actions = apply_filters( 'woocommerce_my_account_my_orders_actions', $actions, $order ) ) {
                                          foreach ( $actions as $key =&gt; $action ) {
                                              echo '&lt;a href="' . esc_url( $action['url'] ) . '" class="button ' . sanitize_html_class( $key ) . '"&gt;' . esc_html( $action['name'] ) . '&lt;/a&gt;';
                                          }
                                      }
                                  ?&gt;
                              &lt;?php endif; ?&gt;
                          &lt;/td&gt;
                      &lt;?php endforeach; ?&gt;
                  &lt;/tr&gt;
              &lt;?php endforeach; ?&gt;
          &lt;/tbody&gt;
      &lt;/table&gt;
  &lt;?php endif; ?&gt;
  </code></pre>