Linux 软件免费装
Banner图

SLNWP Role Extension for Paid Memberships Pro

开发者 jainanda
更新时间 2026年11月4日 11:49
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

roles membership pmpro user roles paid memberships pro

下载

2.1.10 2.1.11

详情介绍:

Members get a WordPress role for each Paid Memberships Pro level, kept up to date automatically. That makes it easier to show or hide content in page builders, using the role conditions most of them already provide. A bulk re-sync brings existing members into line. Requires Paid Memberships Pro, available from paidmembershipspro.com (it is not in the WordPress.org plugin directory). It replaces the official PMPro Roles add-on and fixes these issues with it: What You Can Do With Roles Key Features How It Works Each PMPro membership level has a "WordPress Role" dropdown in its settings. Choose the role you want assigned to members of that level. Multiple levels can share the same role — ideal for sites that offer the same membership tier at different payment frequencies (monthly, quarterly, annually). Roles are automatically synced when: Protected Roles The following roles are never removed under any circumstances: Note: protecting a role only stops this plugin from removing it — a non-member is still assigned the site's default role (usually subscriber) as normal. Protection just means that role, once held, can never be stripped again afterwards. For the same reason, a protected role can't be chosen as a membership level's role: members would keep it after their membership ended. If a level already uses one, the plugin shows a warning naming that level. You can add additional protected roles via filter: add_filter('pmpro_protected_roles', function($roles) { $roles[] = 'shop_manager'; return $roles; }); Requirements

安装:

  1. Upload the slnwp-role-extension-pmpro folder to /wp-content/plugins/
  2. Activate the plugin through the Plugins screen in WordPress
  3. Make sure the official PMPro Roles add-on is deactivated
  4. Go to Memberships → Membership Levels and edit each level to choose its WordPress Role
  5. Go to Memberships → Role Sync and click Run Sync Now to fix all existing users

屏幕截图:

  • The About tab: how roles are kept in sync, and every level's configured role at a glance.
  • The Sync tab: bring all existing members into line in one click, with the protected roles that are never removed.
  • The Developers tab: the pmpro_protected_roles filter for adding your own protected roles.

升级注意事项:

2.1.10 First WordPress.org release.

常见问题:

Do I need the official PMPro Roles add-on installed?

No — this plugin is a complete replacement. The official add-on must be deactivated to avoid conflicts. This plugin will show a warning in the admin if it detects the official add-on is still active.

Can multiple membership levels share the same role?

Yes — this is a core feature. If you offer Gold Monthly (Level 1), Gold Quarterly (Level 2), and Gold Annual (Level 3), simply choose the gold role for all three levels. Members will be assigned the gold role regardless of which payment plan they chose.

What happens when a membership is cancelled?

The membership role is removed. If the user has no other active memberships, they are reset to the default WordPress role (usually subscriber). Protected roles such as administrator are never touched.

What happens if a user has both an admin role and a membership?

Both roles are handled correctly. The membership role is assigned and removed as normal, while the admin role is always preserved. This was a key bug in the official add-on that this plugin fixes.

How do I fix existing users whose roles are out of sync?

Go to Memberships → Role Sync and click Run Sync Now. This is safe to run at any time.

How do I add a role to the protected list?

Add a filter to your theme's functions.php: add_filter('pmpro_protected_roles', function($roles) { $roles[] = 'shop_manager'; return $roles; });

What WordPress roles are protected by default?

  • administrator
  • editor
  • author
  • contributor
  • customer (WooCommerce)
  • subscriber

Is subscriber protected, given it's also the fallback role for non-members?

Yes. Protection only blocks removal — a member who loses their last active membership is still reset to the site's default role (usually subscriber) exactly as before. Protecting it just means that once assigned, it can never be stripped again afterwards, the same as every other protected role.

Does this work with WooCommerce?

Yes — the customer role is in the protected list by default so WooCommerce customers are never affected by membership role changes.

更新日志:

2.1.11 2.1.10