# Flag Orders That Have a Customer Note

> Adds a narrow column to the admin orders list with an icon on orders where the customer left a note, and shows the note when you hover over it.

- Type: PHP
- Runs: Admin only
- Category: [WooCommerce](https://wpide.com/library/category/woocommerce/)
- Requires: WooCommerce
- Tags: woocommerce, admin, orders, notes
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/woo-orders-customer-note-column/

## Code

```php
$wpide_note_column = function ( $columns ) {
    $new = array();

    foreach ( $columns as $key => $label ) {
        $new[ $key ] = $label;

        if ( 'order_number' === $key ) {
            $new['wpide_note'] = '<span class="dashicons dashicons-format-chat" title="Customer note"></span><span class="screen-reader-text">Customer note</span>';
        }
    }

    return $new;
};

$wpide_note_render = function ( $column, $order ) {
    if ( 'wpide_note' !== $column ) {
        return;
    }

    $order = $order instanceof WC_Order ? $order : wc_get_order( $order );
    $note  = $order ? trim( (string) $order->get_customer_note() ) : '';

    if ( '' !== $note ) {
        printf( '<span class="dashicons dashicons-format-chat" style="color:#d63638" title="%1$s"></span><span class="screen-reader-text">%2$s</span>', esc_attr( $note ), esc_html( $note ) );
    }
};

add_filter( 'manage_woocommerce_page_wc-orders_columns', $wpide_note_column );
add_filter( 'manage_edit-shop_order_columns', $wpide_note_column );
add_action( 'manage_woocommerce_page_wc-orders_custom_column', $wpide_note_render, 10, 2 );
add_action( 'manage_shop_order_posts_custom_column', $wpide_note_render, 10, 2 );

add_action( 'admin_head', function () {
    echo '<style>.column-wpide_note{width:2.5em;text-align:center}</style>';
} );
```

## Notes

Helps you spot delivery instructions and gift messages before packing.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Flag Orders That Have a Customer Note" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
