PHPackages                             arraypress/edd-register-fields - 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. [Admin Panels](/categories/admin)
4. /
5. arraypress/edd-register-fields

ActiveLibrary[Admin Panels](/categories/admin)

arraypress/edd-register-fields
==============================

A comprehensive library for registering custom fields in Easy Digital Downloads admin interface

02PHP

Since Dec 4Pushed 7mo agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

EDD Register Fields - Custom Field Registration for Easy Digital Downloads
==========================================================================

[](#edd-register-fields---custom-field-registration-for-easy-digital-downloads)

Add custom fields to Easy Digital Downloads download editor, pricing options, and sidebar metaboxes with a simple, clean API.

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

[](#installation)

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

Basic Usage
-----------

[](#basic-usage)

### Download Settings Fields

[](#download-settings-fields)

Add custom fields to the download settings tab:

```
// Register custom download settings fields
edd_register_download_settings_fields( [
    'product_settings' => [
        'title'       => 'Product Settings',
        'description' => 'Additional product configuration options',
        'fields'      => [
            'is_featured' => [
                'type'        => 'checkbox_toggle',
                'label'       => 'Featured Product',
                'description' => 'Mark this product as featured',
                'default'     => false
            ],
            'product_weight' => [
                'type'        => 'number',
                'label'       => 'Weight (for sorting)',
                'description' => 'Higher numbers appear first',
                'default'     => 0,
                'attributes'  => [
                    'min' => 0,
                    'max' => 9999
                ]
            ]
        ]
    ]
] );
```

### Single Price Options

[](#single-price-options)

Add fields that appear when variable pricing is disabled:

```
// Register single price option fields
edd_register_single_price_fields( [
    'license_options' => [
        'fields' => [
            'site_limit' => [
                'type'    => 'number',
                'label'   => 'Site Limit',
                'default' => 1,
                'prefix'  => 'Max:',
                'suffix'  => 'sites'
            ],
            'includes_support' => [
                'type'    => 'checkbox_toggle',
                'label'   => 'Includes Support',
                'default' => true
            ]
        ]
    ]
] );
```

### Variable Price Options

[](#variable-price-options)

Add fields to each variable price row:

```
// Register variable price fields
edd_register_variable_price_fields( [
    'license_tiers' => [
        'title'  => 'License Options',
        'fields' => [
            'is_popular' => [
                'type'    => 'checkbox_toggle',
                'label'   => 'Popular',
                'default' => false
            ],
            'license_limit' => [
                'type'       => 'number',
                'label'      => 'Site Limit',
                'default'    => 1,
                'attributes' => [
                    'min' => 1,
                    'max' => 999
                ]
            ]
        ]
    ]
] );
```

### Sidebar Metaboxes

[](#sidebar-metaboxes)

Add custom metaboxes to the download editor sidebar:

```
// Register sidebar metaboxes
edd_register_sidebar_metaboxes( [
    'seo_settings' => [
        'title'    => 'SEO Settings',
        'priority' => 'high',
        'sections' => [
            'meta_options' => [
                'title'  => 'Meta Options',
                'fields' => [
                    'meta_title' => [
                        'type'  => 'text',
                        'label' => 'Custom Meta Title',
                        'class' => 'widefat'
                    ],
                    'exclude_sitemap' => [
                        'type'    => 'checkbox_toggle',
                        'label'   => 'Exclude from Sitemap',
                        'default' => false
                    ]
                ]
            ]
        ]
    ]
] );
```

### Custom Sections

[](#custom-sections)

Register custom sections with configurable fields:

```
// Register custom sections
edd_register_sections( [
    'custom_section' => CustomSection::class
] );

// Example custom section class
class CustomSection extends ArrayPress\EDD\Fields\ConfigurableSection {

    protected $id = 'custom_section';
    protected $priority = 25;
    protected $icon = 'admin-tools';

    protected function get_section_config(): array {
        return [
            'title'  => 'Custom Section',
            'fields' => [
                'custom_field' => [
                    'type'        => 'text',
                    'label'       => 'Custom Field',
                    'description' => 'A custom field example',
                    'default'     => ''
                ]
            ]
        ];
    }
}
```

Field Types
-----------

[](#field-types)

TypeDescriptionExample`text`Text input`'type' => 'text'``textarea`Multi-line text`'type' => 'textarea'``number`Number input`'type' => 'number'``email`Email input`'type' => 'email'``url`URL input`'type' => 'url'``select`Dropdown select`'type' => 'select'``checkbox`Checkbox`'type' => 'checkbox'``checkbox_toggle`EDD toggle`'type' => 'checkbox_toggle'``radio`Radio buttons`'type' => 'radio'``currency`Currency input`'type' => 'currency'``color`Color picker`'type' => 'color'`Field Options
-------------

[](#field-options)

### Common Options

[](#common-options)

OptionDescriptionExample`type`Field type`'text'``label`Field label`'Product Name'``description`Help text`'Enter the product name'``default`Default value`'Default value'``required`Required field`true``class`CSS classes`'regular-text'``attributes`HTML attributes`['min' => 0, 'max' => 100]`### Select/Radio Options

[](#selectradio-options)

```
'product_type' => [
    'type'    => 'select',
    'label'   => 'Product Type',
    'options' => [
        'digital'  => 'Digital Product',
        'physical' => 'Physical Product',
        'service'  => 'Service'
    ],
    'default' => 'digital'
]
```

### Number Fields

[](#number-fields)

```
'priority' => [
    'type'       => 'number',
    'label'      => 'Priority',
    'default'    => 0,
    'attributes' => [
        'min'  => 0,
        'max'  => 100,
        'step' => 5
    ]
]
```

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

[](#requirements)

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

Contributing
------------

[](#contributing)

Contributions are welcome! Please feel free to submit a Pull Request.

License
-------

[](#license)

This project is licensed under the GPL-2.0-or-later License.

Support
-------

[](#support)

- [Documentation](https://github.com/arraypress/edd-register-fields)
- [Issue Tracker](https://github.com/arraypress/edd-register-fields/issues)

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance45

Moderate activity, may be stable

Popularity2

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 (2 commits)")

### Embed Badge

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

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

PHPackages © 2026

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