PHPackages                             arraypress/edd-register-columns - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. arraypress/edd-register-columns

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

arraypress/edd-register-columns
===============================

Lightweight library for registering custom columns in Easy Digital Downloads tables.

010PHP

Since Dec 7Pushed 5mo agoCompare

[ Source](https://github.com/arraypress/edd-register-columns)[ Packagist](https://packagist.org/packages/arraypress/edd-register-columns)[ RSS](/packages/arraypress-edd-register-columns/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Easy Digital Downloads - Register Columns
=========================================

[](#easy-digital-downloads---register-columns)

A lightweight library for adding custom columns to Easy Digital Downloads admin tables.

Installation
------------

[](#installation)

```
composer require arraypress/edd-register-columns
```

Requirements
------------

[](#requirements)

- PHP 7.4+
- WordPress 5.0+
- Easy Digital Downloads 3.0+

Quick Start
-----------

[](#quick-start)

### Downloads

[](#downloads)

```
edd_register_download_columns( [
    'sku' => [
        'label'            => __( 'SKU', 'text-domain' ),
        'meta_key'         => 'edd_sku',
        'sortable'         => true,
        'position'         => 'after:title',
    ],
] );
```

### Orders

[](#orders)

```
edd_register_order_columns( [
    'tax_amount' => [
        'label'            => __( 'Tax', 'text-domain' ),
        'display_callback' => function( $order ) {
            return edd_currency_filter( edd_format_amount( $order->tax ) );
        },
        'sortable'         => true,
        'position'         => 'after:amount',
    ],
] );
```

### Customers

[](#customers)

```
edd_register_customer_columns( [
    'lifetime_value' => [
        'label'            => __( 'LTV', 'text-domain' ),
        'display_callback' => function( $customer ) {
            return edd_currency_filter( edd_format_amount( $customer->purchase_value ) );
        },
        'position'         => 'after:spent',
    ],
] );
```

### Discounts

[](#discounts)

```
edd_register_discount_columns( [
    'usage_percent' => [
        'label'            => __( 'Usage %', 'text-domain' ),
        'display_callback' => function( $discount ) {
            if ( $discount->max_uses use_count / $discount->max_uses ) * 100 );
        },
        'sortable'         => true,
        'position'         => 'after:uses',
    ],
] );
```

### Commissions (EDD Commissions)

[](#commissions-edd-commissions)

```
edd_register_commission_columns( [
    'commission_type' => [
        'label'            => __( 'Type', 'text-domain' ),
        'display_callback' => function( $commission ) {
            return ucfirst( esc_html( $commission->type ) );
        },
        'position'         => 'after:rate',
    ],
] );
```

### Licenses (EDD Software Licensing)

[](#licenses-edd-software-licensing)

```
edd_register_license_columns( [
    'license_version' => [
        'label'            => __( 'Version', 'text-domain' ),
        'display_callback' => function( $license, $item ) {
            $version = edd_software_licensing()->license_meta_db->get_meta( $license->ID, '_edd_sl_version', true );
            return ! empty( $version ) ? esc_html( $version ) : '—';
        },
        'position'         => 'after:title',
    ],
] );
```

### Subscriptions (EDD Recurring)

[](#subscriptions-edd-recurring)

```
edd_register_subscription_columns( [
    'times_billed' => [
        'label'            => __( 'Renewals', 'text-domain' ),
        'display_callback' => function( $subscription ) {
            $times_billed = absint( $subscription->get_total_payments() ) - 1;
            return $times_billed > 0 ? number_format_i18n( $times_billed ) : '0';
        },
        'position'         => 'after:period',
    ],
] );
```

Column Options
--------------

[](#column-options)

```
[
    'label'               => '',       // Column header label
    'meta_key'            => '',       // Meta key (optional)
    'sortby'              => '',       // Custom sort field (optional)
    'position'            => '',       // 'after:column' or 'before:column'
    'sortable'            => false,    // Enable sorting (where supported)
    'numeric'             => false,    // Use numeric sorting
    'display_callback'    => null,     // Custom display function
    'permission_callback' => null,     // Permission check function
    'width'               => null,     // Column width (e.g., '100px')
]
```

Position Examples
-----------------

[](#position-examples)

```
'position' => 'after:title',   // Place after the title column
'position' => 'before:date',   // Place before the date column
```

Sortable Support
----------------

[](#sortable-support)

TableSortableDownloads✅ YesOrders✅ YesCustomers❌ NoDiscounts✅ YesCommissions❌ NoLicenses✅ YesSubscriptions❌ NoRemoving Columns
----------------

[](#removing-columns)

```
edd_register_download_columns(
    [
        'new_column' => [ /* ... */ ],
    ],
    [ 'sales', 'earnings' ] // Remove these columns
);
```

License
-------

[](#license)

GPL-2.0-or-later

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance49

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity13

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/cd6eb8aff0903d87eb674d1ba3c5f3653899c0d7661504eb0deb7798ed86b643?d=identicon)[arraypress](/maintainers/arraypress)

---

Top Contributors

[![arraypress](https://avatars.githubusercontent.com/u/22668877?v=4)](https://github.com/arraypress "arraypress (3 commits)")

### Embed Badge

![Health badge](/badges/arraypress-edd-register-columns/health.svg)

```
[![Health](https://phpackages.com/badges/arraypress-edd-register-columns/health.svg)](https://phpackages.com/packages/arraypress-edd-register-columns)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
