Version 3.0 has been in the works for almost a year and we’re thrilled to finally have the first beta release available for testing. Most notably, version 3.0 introduces custom database tables for memberships and customers, a batch processor to migrate data, payment plans, and much more. This update is particularly exciting because introducing custom tables lays the groundwork for our next big project: adding support for multiple memberships per user.
How to test the beta
In order to help ensure the final release of 3.0 goes as smoothly as possible, we need your help testing this beta version.
Testing the beta is very simple. Simply log into your testing site that has Restrict Content Pro installed and activated and navigate to Restrict → Settings → Misc and check the box for Opt into beta versions:
The beta update will now be available as a standard WordPress plugin update from your Plugins page, though it could take up to a few hours for the notification to appear.
Note: we do not recommend you test the beta on a live site. Use a testing site. While we do our very best to not cause issues during updates, sometimes issues do slip through unnoticed, so having a staging / testing site is very important.
New PHP requirement: version 5.6 or higher
Version 3.0 now requires PHP version 5.6. This will allow us to upgrade some of our third party libraries, such as the Stripe library, and give us more flexibility in the future. Please make sure you’re using PHP 5.6 or greater before updating to 3.0.
Custom tables for memberships and customers
Previously, all membership data was stored as user meta. This has worked fine for simple, single memberships, but is not feasible for some exciting changes we have in mind for the future. As such, membership data is now stored in two new tables with the following columns:
Once the 3.0 update is installed, you will be shown a prompt to migrate your membership data from user meta to the new tables. These tables give us more speed and flexibility with querying, sorting, and searching membership information.
We also have new admin interfaces for managing customers and their memberships.
Payment plans have been a popular request by customers wanting to give their members the option of paying the full amount upfront, or paying the amount in instalments over the course of several months. If your membership content is more expensive and normally a one-off payment, it may be easier for some customers to pay smaller amounts over a greater period of time.
This feature introduces the ability to set a maximum number of renewals for membership levels, along with an “after final payment” action. As an example, you can create a membership level that is $100 per month and is limited to three renewals. This is a total of four payments (initial payment of $100, plus three renewals of $100 each). After the final payment, the subscription is cancelled and the customer is given lifetime access to the content. This might be an alternative to charging a single amount of $400 upfront.
Restrict content to multiple user roles
The post restriction metabox now allows you to select more than one role when using role restriction. Instead of just allowing access to “editors”, you can choose to allow access to “editors” and “contributors”.
The [restrict] shortcode also now supports custom roles in the userlevel attribute. In the past, it only supported the built-in roles such as admin, editor, contributor, etc. Now you can enter a custom role, such as “shop_vendor”, or even a comma-separated list of multiple roles. For example:
One restriction message
Previously there were two restriction message settings: Free Content Message, and Paid Content Message. In 3.0, we’ve merged these two into one single “Restricted Content Message”. As restriction settings get more complex, so does figuring out whether content is free or paid. If you allow members of a free level to access Post A, but also let members of a paid level access Post A, is Post A free or paid? Which message should be used? What about if you restrict Post B to access level “4 or higher”, but there are both free and paid membership levels that grant that access level? This has caused confusion for many of our customers, and having one single restriction message brings more clarity.
Upon upgrading to 3.0 you’ll be asked to confirm your new “Restricted Content Message” setting.
The restriction message does have a filter, rcp_restricted_message. You can use this if you want to add custom code to once again create separate messages for free vs paid content.
- “Subscription Levels” have been renamed to “Membership Levels”.
- Added a batch processing API.
- Memberships can now be sorted by expiration date.
- The Stripe API library has been updated.
- The “Email IPN Report” feature has been removed.
- Our login functions now use wp_signon(). This allows greater support for third party plugins that integrate with the login system, such as Jetpack Protect.
- The invoice template has been expanded to include fees, discounts, and credits that were applied to that payment.
- The “Auto Add Users to Level” setting has been added to the system info file.
- The PayPal Express confirmation screen has been updated to include additional information, including discounts, fees, and credits.
- The login link text in the registration template has been adjusted.
- object_id is now supported in RCP_Payments::count().
- Improved error messaging when adding/updating membership levels fails.
- Original join dates are now stored (in the wp_rcp_customers table).
- “Prevent Account Sharing” setting now accepts a maximum number of simultaneous connections.
- When a user account is deleted, associated recurring subscriptions are now automatically cancelled.
Notable bug fixes
- Password reset links will now work with SendGrid click tracking.
- RCP user meta is now removed during uninstall.
- The payment_id column name in the wp_rcp_payment_meta table has been renamed to rcp_payment_id. This fixes a conflict with the Give plugin.
- The admin bar is no longer hidden for users who have the “edit_posts” capability.
- Under certain circumstances it was possible for rcp_get_ip() to return a CSV of IP addresses instead of a single IP.
- Databases are now registered when switching sites on multisite.
- Fixed a DateTime::__construct() fatal error in Authorize.net when signing up for a free trial.
- In the wp_rcp_payments table, the following column types have been updated: id (now unsigned), object_id (now unsigned), user_id (changed from mediumint to bigint(20) and now unsigned).
The following template files have been edited. If you’ve overridden these, please compare with our changes to ensure your files continue to work as expected.
Release date for 3.0
The beta version of 3.0 is available today and we hope to release the final version on or near the 29th of January, 2019.