WP Manifestindependent plugin directory
manifest / users / pmpro-magic-levels

PMPro Magic Levels

Dynamically create or find membership levels from user interactions or predefined inputs, then automatically redirect users to checkout.

★ 1stars
v1.2.0latest · 9mo ago

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/raphaelsuzuki/pmpro-magic-levels/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Dynamically create or find membership levels from user interactions or predefined inputs, then automatically redirect users to checkout—no more manual creation of every membership variation in the admin dashboard.

Perfect for 'name-your-price' forms, complex plan systems, dynamic pricing systems, and any scenario requiring dozens of membership variations without admin panel clutter.

Integrate with form plugins, page builders, help desks, and workflow automations to give your membership site more power and flexibility. We have a growing list of compatibility with popular plugins like WSForm, Contact Form 7, and Formidable Forms.

Notice: This plugin is intended for developers. It exposes a powerful REST API and writes membership data based on incoming payloads. Secure your tokens and follow the Security Best Practices.


Key Features

  • Dynamic Level Creation: Generate membership levels on-demand from form submissions or API calls.
  • Smart Level Matching: Automatically detects and reuses existing levels with matching parameters to prevent duplicates.
  • Three-Tier Caching System: Lightning-fast lookups via Memory, Transient, and Database.
  • Full Pricing Control: Support for one-time payments, subscriptions, trials, billing limits, and expirations.
  • Automatic Content Protection: Protect categories, pages, and posts instantly during level creation.
  • Group-Based Organization: Automatic level assignment to groups using the required "Group - Level" naming format.

Learn more about our architecture and technical overview in the Wiki.


Quick Start

The plugin provides two main methods to create membership levels. Choose the one that fits your environment:

Integration Comparison

Feature Internal PHP Integration REST API Integration (Remote)
Recommendation Best for WordPress Plugins Best for Automators (Zapier, n8n)
Performance Instant (Direct call) Slower (HTTP Request)
Authentication Automatic (Internal) Required (Bearer Token)
Ease of Use High (Drop-in snippet) Medium (Requires JSON handling)

Method A: Internal PHP Integration (Recommended)

Here's a simple example of how to generate a level and redirect the user to checkout. This can be used inside your own plugins, themes, or form handlers (e.g., WSForm, CF7, Formidable).

$result = pmpro_magic_levels_process([
    'name'           => 'Premium - Gold',
    'billing_amount' => 29.99,
    'cycle_period'   => 'Month',
    'cycle_number'   => 1,
]);

if ( $result['success'] ) {
    wp_redirect( $result['redirect_url'] );
    exit;
}

Check on the wiki for more details

Method B: REST API Integration (Remote)

You can create new levels just by using a cURL request. You'll need to generate a token in PMPro > Magic Levels. An easiest way to test the plugin is by clicking the Test button in the PMPro > Magic Levels page.

curl -X POST https://yoursite.com/wp-json/pmpro-magic-levels/v1/process \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "Standard - Silver", "billing_amount": 10.00, "cycle_period": "Month", "cycle_number": 1}'

Check on the wiki for more details


Documentation

Comprehensive guides, technical specifications, and advanced validation rules are available on our GitHub Wiki.

Useful Wiki Links:

Support

Contributing

Contributions are welcome! Please submit pull requests or open issues on GitHub.

License

GPL v2 or later - https://www.gnu.org/licenses/gpl-2.0.html

Disclaimer

This repository and its documentation were created with the assistance of AI. While efforts have been made to ensure accuracy and completeness, no guarantee is provided. Use at your own risk. Always test in a safe environment before deploying to production.

Releases

1 release.

Tag
Published
v1.2.0 latest
Jan 18, 2026 9mo ago

These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.