Reorder the Columns on the WooCommerce Orders List

The WooCommerce orders list has a fixed column order: checkbox, order number, date, status, total, actions. Plugins add their own columns wherever they please, which usually means appending at the right edge. After installing a few WooCommerce extensions (shipment tracking, Wholesale Prices, Print Invoices, custom notes columns), the table becomes a scroll-fest where the columns you actually care about are buried.

You can put the columns in any order you want by reordering the array WooCommerce passes through manage_woocommerce_page_wc-orders_columns (HPOS) and manage_edit-shop_order_columns (legacy). The snippet below defines your preferred order in one place, applies it to both backends, and gracefully handles columns added by future plugins by appending them at the end.

/**
 * Reorder the columns on the WooCommerce orders list.
 *
 * Define your preferred order in $preferred_order. Columns not in the
 * list are appended at the end in their original relative order,
 * so new plugin columns won't disappear, they'll just be at the right edge.
 *
 * Works for both HPOS and legacy order storage.
 */
add_filter('manage_woocommerce_page_wc-orders_columns', 'carticy_reorder_order_columns', 20);
add_filter('manage_edit-shop_order_columns', 'carticy_reorder_order_columns', 20);
function carticy_reorder_order_columns($columns)
{
    // List the column keys in the order you want them displayed
    $preferred_order = array(
        'cb',
        'order_number',
        'order_status',
        'order_date',
        'customer_note',
        'private_note',
        'order_total',
        'shipment_tracking',
        'wc_actions',
    );

    $reordered = array();

    // Add preferred columns first, in the order specified above
    foreach ($preferred_order as $key) {
        if (isset($columns[$key])) {
            $reordered[$key] = $columns[$key];
        }
    }

    // Append any columns that weren't in our preferred list
    foreach ($columns as $key => $label) {
        if (!isset($reordered[$key])) {
            $reordered[$key] = $label;
        }
    }

    return $reordered;
}

Finding the Column Keys

Every column has a slug-style key. Common ones are visible in the snippet (order_number, order_status, order_date, order_total). Plugin-added columns use their own keys, and you need to know the keys to reorder them. Two ways to find them:

  • Inspect the HTML. Open the orders list, right-click any column header, choose Inspect. The th tag will have a class like column-shipment_tracking or manage-column column-private_note. The part after column- is the column key.
  • Dump the array. Temporarily add error_log(print_r(array_keys($columns), true)); at the start of the function. Reload the orders page, then check your debug log for the full list of registered keys.

Why the Append-Remaining Pattern Matters

It’s tempting to just return a fixed array with only the columns you listed. Don’t. When a future plugin adds a new column, it would silently disappear because your filter overwrote the array without including it. The two-pass pattern above (first your preferred order, then append anything not yet placed) keeps unknown columns visible, just at the right edge where they don’t interfere.

The filter priority of 20 in the add_filter calls is also intentional. WooCommerce’s own column registrations run at priority 10, and most plugins use 10 or lower. Running at 20 means your reorder fires after everyone else has added their columns, so the array you receive is complete.

Verification

  1. Add the snippet to your child theme’s functions.php or a custom plugin
  2. Customize $preferred_order with the column keys you want, in your preferred order
  3. Go to WooCommerce > Orders and confirm the columns appear in the new order
  4. Install or activate a plugin that adds another column to the orders list, then reload the page
  5. Confirm the new plugin’s column appears at the end of the table rather than going missing

Need Help?

Learn how to add custom code to WordPress or reach out for custom development help.


About the Author

Ali Khallad

Ali Khallad

I’m Ali Khallad, a WordPress developer who’s been building custom plugins and WooCommerce solutions for over 10 years. I created Mega Forms and several extensions you’ll find on Carticy. I love solving tricky WordPress problems and sharing what I learn along the way. When I’m not coding, you’ll find me travelling, riding horses, or hunting down the best local food wherever I am.


More Code Snippets