The Invite Only Membership Add On doesn’t have a settings screen. You choose which levels require an invite code, which levels hand out codes, and how many codes each member gets by adding a few lines of custom code to your site.

Add the Settings to Your Site

Each setting is a PHP global variable or constant. Add them using your membership site customizations method of choice, such as a customizations plugin or a code snippets plugin. Paste the code as shown on this page, outside of any function, so the values are in place before the Add On reads them.

Note: Until you set $pmproio_invite_required_levels, the Add On does nothing. Checkout doesn’t ask for a code and no member receives invite codes.

Find Your Level IDs

The settings use membership level IDs, not level names.

  1. Navigate to Memberships > Settings > Levels in the WordPress admin.
  2. Find the level in the list. Its number is in the ID column.

Settings Reference

Levels That Require an Invite Code

Required. An array of level IDs. Checkout for these levels shows an Invite Code field, and the member can’t complete checkout without a valid code. There is no default.

global $pmproio_invite_required_levels;
$pmproio_invite_required_levels = array( 1 );

Levels That Give Invite Codes

Optional. An array of level IDs. Members who receive one of these levels get invite codes to share. If you don’t set it, it uses the same levels as $pmproio_invite_required_levels.

These levels don’t have to require an invite code themselves. For example, you can let members of an open paid level invite people to a private level.

global $pmproio_invite_given_levels;
$pmproio_invite_given_levels = array( 1 );

Number of Invite Codes per Member

Optional. How many invite codes a member gets. The default is 1. This is also the most codes a member can get automatically. Renewing or changing levels never pushes a member past this number. Administrators can add more from the Invite Codes panel on the Edit Member screen.

define( 'PMPROIO_CODES', 1 );

Note: Codes are created during checkout, and each code after the first adds about a second to the checkout. A large number (25 or more) can make checkout very slow or time out. If you want members to invite many people, give them one code with more uses through PMPROIO_CODES_USES instead.

Number of Uses per Invite Code

Optional. How many people can check out with each code. The default is false, which means unlimited uses. Set a number to limit each code, such as 1 for single-use codes.

define( 'PMPROIO_CODES_USES', false );

Complete Example

This example makes level 2 invite-only, gives codes to members of levels 1 and 2, and gives each member three single-use codes.

// Checkout for level 2 requires an invite code.
global $pmproio_invite_required_levels;
$pmproio_invite_required_levels = array( 2 );

// Members of levels 1 and 2 get invite codes to share.
global $pmproio_invite_given_levels;
$pmproio_invite_given_levels = array( 1, 2 );

// Each member gets 3 codes, and each code works once.
define( 'PMPROIO_CODES', 3 );
define( 'PMPROIO_CODES_USES', 1 );

Common Setups

  • One Shareable Code per Member: Set only $pmproio_invite_required_levels. Each member of those levels gets one code that any number of people can use.
  • A Fixed Number of Invitations: Set PMPROIO_CODES_USES to 1 and PMPROIO_CODES to the number of people each member can invite. Or keep one code and set PMPROIO_CODES_USES to that number, which keeps checkout fast.
  • Invitations From Another Level: List the private level in $pmproio_invite_required_levels and the levels whose members can invite people in $pmproio_invite_given_levels. Include the private level too if its members should be able to invite others.

Get Your First Invite Codes Into Circulation

When you first make a level invite-only, nobody holds a code yet. Codes are only created when a member receives a level that gives codes, so members who already had that level before you added the settings don’t get codes automatically either. Use one of these options to get started:

  • Assign the Level From the Admin: Give yourself or your founding members the level from the Memberships panel of the Edit Member screen. Administrators don’t need an invite code to assign a level, and the member gets their codes as soon as the level is saved.
  • Add Codes to an Existing Member: Open the member’s Invite Codes panel and increase their total available invites.

Note: A code only works while the member who owns it holds an active membership level. If you create codes for your own administrator account, give yourself a membership level too.

Last updated on November 19, 2026


Was this article helpful?
YesNo