title: How to change column heading in WooCommerce "My account" orders table
body: <p>How can I change the column header text in recent order table in WooCommerce?</p>
  <p>See attached image</p>
  <p><a href="https://i.stack.imgur.com/toNvS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/toNvS.png" alt="enter image description here" /></a></p>
  <p>The <code>myaccount/my-orders.php</code> template file in my theme contains:</p>
  <pre><code>&lt;?php
  /**
   * My Orders - Deprecated
   *
   * @deprecated 2.6.0 this template file is no longer used. My Account shortcode uses orders.php.
   * @package WooCommerce\Templates
   */
  
  defined( 'ABSPATH' ) || exit;
  
  $my_orders_columns = apply_filters(
      'woocommerce_my_account_my_orders_columns',
      array(
          'order-number'  =&gt; esc_html__( 'Order', 'woocommerce' ),
          'order-date'    =&gt; esc_html__( 'Date', 'woocommerce' ),
          'order-status'  =&gt; esc_html__( 'Status', 'woocommerce' ),
          'order-total'   =&gt; esc_html__( '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', esc_html__( 'Recent orders', 'woocommerce' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?&gt;&lt;/h2&gt;
  
      &lt;table class=&quot;shop_table shop_table_responsive my_account_orders&quot;&gt;
  
          &lt;thead&gt;
              &lt;tr&gt;
                  &lt;?php foreach ( $my_orders_columns as $column_id =&gt; $column_name ) : ?&gt;
                      &lt;th class=&quot;&lt;?php echo esc_attr( $column_id ); ?&gt;&quot;&gt;&lt;span class=&quot;nobr&quot;&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 ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
                  $item_count = $order-&gt;get_item_count();
                  ?&gt;
                  &lt;tr class=&quot;order&quot;&gt;
                      &lt;?php foreach ( $my_orders_columns as $column_id =&gt; $column_name ) : ?&gt;
                          &lt;td class=&quot;&lt;?php echo esc_attr( $column_id ); ?&gt;&quot; data-title=&quot;&lt;?php echo esc_attr( $column_name ); ?&gt;&quot;&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=&quot;&lt;?php echo esc_url( $order-&gt;get_view_order_url() ); ?&gt;&quot;&gt;
                                      &lt;?php echo _x( '#', 'hash before order number', 'woocommerce' ) . $order-&gt;get_order_number(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?&gt;
                                  &lt;/a&gt;
  
                              &lt;?php elseif ( 'order-date' === $column_id ) : ?&gt;
                                  &lt;time datetime=&quot;&lt;?php echo esc_attr( $order-&gt;get_date_created()-&gt;date( 'c' ) ); ?&gt;&quot;&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 ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
                                  ?&gt;
  
                              &lt;?php elseif ( 'order-actions' === $column_id ) : ?&gt;
                                  &lt;?php
                                  $actions = wc_get_account_orders_actions( $order );
  
                                  if ( ! empty( $actions ) ) {
                                      foreach ( $actions as $key =&gt; $action ) { // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
                                          echo '&lt;a href=&quot;' . esc_url( $action['url'] ) . '&quot; class=&quot;button ' . sanitize_html_class( $key ) . '&quot;&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>