Skip to main content

Paid Memberships Pro Integration

Create (or reuse) a WordPress user and assign them a Paid Memberships Pro membership level when a form is submitted, with an optional user meta map.

Action type: pmpro Label: Assign Paid Memberships Pro Level Dependency: Paid Memberships Pro (available only when pmpro_changeMembershipLevel() exists) Handler: Core_Forms\Integrations\IntegrationHandlers::pmpro Source: src/integrations/class-integration-manager.php, src/integrations/class-integration-handlers.php

Setup

  1. Make sure Paid Memberships Pro is installed and active. The action does not appear in the Actions list otherwise.
  2. Find the level ID under Memberships > Settings > Levels (shown in the level list/edit URL).
  3. In WordPress, edit your form > Actions tab > Add Action > Assign Paid Memberships Pro Level.
  4. Enter the level ID and adjust the contact field mappings if needed.

Settings Reference

Setting Required Default Description
Email Yes [email] Member email; must resolve to a valid address
First name No [first_name] Member first name
Last name No [last_name] Member last name
Phone No [phone] Member phone
Membership level ID Yes -- Numeric PMPro level ID to assign
User meta map No -- One user_meta_key=value per line, saved to the user profile

All text settings support Core Forms data variables such as [email] or any form field name, so meta-map values can pull from submitted fields.

User Handling

  • If a WordPress user with the submitted email already exists, the level is assigned to that account.
  • Otherwise a new subscriber user is created. The login is derived from the email's local part (with a numeric suffix on collisions) and the password is a random 24-character string. Core Forms does not email credentials; new members can set a password through the standard WordPress reset flow.

How It Works

  1. The user is looked up or created as described above; if that fails the action reports "Could not create the PMPro user."
  2. The level is assigned with pmpro_changeMembershipLevel(). Per PMPro's standard behavior this changes the user's membership level, replacing a current level.
  3. After a successful level change, each user-meta-map line is written with update_user_meta() (keys are sanitized; values support data variables).
  4. If PMPro rejects the change, the action fails with "PMPro could not assign the membership level."

Each run is idempotent: Core Forms builds a key from the submission ID, action type, and resolved settings, so re-processing the same submission never repeats the assignment.

Example: Free Tier Signup

Form with email, first_name, last_name, and company fields:

  • Membership level ID: 1
  • User meta map: company=[company] signup_source=core-forms

Troubleshooting

  • Action missing from the Actions list: Paid Memberships Pro must be active; the availability check looks for pmpro_changeMembershipLevel().
  • "Could not create the PMPro user": The email resolved to an empty or invalid address. Verify the Email setting maps to a real form field.
  • "PMPro could not assign the membership level": Usually a wrong or deleted level ID. Confirm the numeric ID under Memberships > Settings > Levels.
  • Meta not saved: User meta is only written after the level change succeeds, and lines must use the key=value format.