# Paid Memberships Pro: Company Name Field at Checkout

> Adds an optional "Company" field to the Paid Memberships Pro checkout and member profile, saved with the member's account.

- Type: PHP
- Runs: Run everywhere
- Category: [Memberships](https://wpide.com/library/category/memberships/)
- Tags: pmpro, checkout, fields
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/pmpro-company-field-at-checkout/

## Code

```php
add_action( 'init', function () {
    if ( ! function_exists( 'pmpro_add_user_field' ) || ! function_exists( 'pmpro_add_field_group' ) || ! class_exists( 'PMPro_Field' ) ) {
        return;
    }

    pmpro_add_field_group( 'wpide_company', 'Company details' );
    pmpro_add_user_field( 'wpide_company', new PMPro_Field( 'company', 'text', array(
        'label'    => 'Company',
        'profile'  => true,
        'required' => false,
        'size'     => 40,
    ) ) );
} );
```

## Notes

Uses PMPro's user fields API (PMPro 2.9 or newer). Set required to true to make it mandatory; the value is stored in the "company" user meta.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Paid Memberships Pro: Company Name Field at Checkout" 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/
