wpsharks / s2member-kb

The s2Member® and s2Member® Pro Knowledge Base
9 stars 4 forks source link

re: How many membership levels can I have? #326

Open ndaccesswebservice opened 7 years ago

ndaccesswebservice commented 7 years ago

How many membership levels can I have? https://s2member.com/kb-article/how-many-membership-levels-can-i-have/

Please let me know how to add more membership levels with the Pro version as I have the Pro version and could not find the information to change the membership levels to have more than 4. Thank you.

jaswrks commented 6 years ago

Unlimited Membership Levels (via /wp-config.php)

With s2Member Pro installed, you may configure an unlimited number of Membership Levels. You can set the number of Membership Levels by adding this line to the top of your /wp-config.php file:

define("MEMBERSHIP_LEVELS", 4);

This line should be inserted at the top of your /wp-config.php file, right after the <?php tag. Feel free to change the default value of 4 to whatever you need. The minimum allowed value is 1. The recommended maximum is 100.

If you intend to exceed the recommended maximum, you will also need to add a WordPress Filter like this: add_filter("ws_plugin__s2member_max_levels", function(){ return PHP_INT_MAX; });