# Coupons Used Column in the Orders List

> Shows which coupon codes were used on each order in a new column on the admin orders screen.

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

## Code

```php
$wpide_coupon_column_add = function ( $columns ) {
    $columns['wpide_coupons'] = 'Coupons';

    return $columns;
};

$wpide_coupon_column_render = function ( $column, $order ) {
    if ( 'wpide_coupons' !== $column ) {
        return;
    }

    $order = $order instanceof WC_Order ? $order : wc_get_order( $order );
    $codes = $order ? $order->get_coupon_codes() : array();

    echo $codes ? esc_html( implode( ', ', $codes ) ) : '&ndash;';
};

add_filter( 'manage_woocommerce_page_wc-orders_columns', $wpide_coupon_column_add, 20 );
add_filter( 'manage_edit-shop_order_columns', $wpide_coupon_column_add, 20 );
add_action( 'manage_woocommerce_page_wc-orders_custom_column', $wpide_coupon_column_render, 10, 2 );
add_action( 'manage_shop_order_posts_custom_column', $wpide_coupon_column_render, 10, 2 );
```

## Notes

Works with both the HPOS orders screen and the legacy posts-based screen.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Coupons Used Column in the Orders List" 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/
