Version 3.0 released!
Today we are happy to announce the final release of Restrict Content Pro version 3.0. With this being such a huge release, we spent extra time testing all the features and adding support for 3.0 to all our add-ons ahead of time. We’d like to thank everyone who took the time to install and test the beta release – your help was greatly appreciated!
Our 3.0 release includes the ability to create payment plans, which allow your customers to pay membership fees in installments; the ability to restrict content to multiple user roles (including custom ones); brand new database tables that set the stage for supporting multiple memberships for a single user; and more!
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. If you’re not sure how to upgrade your PHP version, you can get instructions from your web host.
Custom tables for memberships and customers
Once the 3.0 update is installed, you will be shown a prompt to migrate your membership data from user meta to our new custom database tables.
Previously, all membership data was stored as user meta. This has worked fine for simple, single memberships, but is not feasible for supporting multiple memberships per user, which is our next big project for version 3.1. These tables also give us more speed and flexibility with querying, sorting, and searching membership information.
Membership data is now stored in two new tables with the following columns:
wp_rcp_customers
- id
- user_id
- date_registered
- email_verification
- last_login
- ips
- notes
- uuid
wp_rcp_memberships
- id
- customer_id
- object_id
- object_type
- currency
- initial_amount
- recurring_amount
- created_date
- trial_end_date
- renewed_date
- cancellation_date
- expiration_date
- payment_plan_completed_date
- auto_renew
- times_billed
- maximum_renewals
- status
- gateway_customer_id
- gateway_subscription_id
- gateway
- signup_method
- subscription_key
- notes
- upgraded_from
- date_modified
- disabled
- uuid
There is also a new wp_rcp_membershipmeta table for storing membership meta data.
With new tables, we also have new classes: RCP_Membership and RCP_Customer. The old RCP_Member class and associated helper functions have been deprecated, but they are fully backwards compatible.
You will also see new admin interfaces for managing customers and their memberships.
No more “free” status
As part of the membership migration, we have also eliminated the “free” status for memberships. Previously this was used for free memberships and the “active” status was only used for paid memberships. This has often been confusing for customers, and rightly so! As of version 3.0, the “free” status has been merged into “active”. A membership is now considered active regardless of whether it is free or paid.
For backwards compatibility, all old functions will continue to work the same way they did in version 2.9 and earlier. For example, rcp_is_active() will only return true if a membership is both active and paid. However, new functions such as RCP_Membership->is_active() will return true regardless of whether the membership is free or paid.
Payment plans
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 installment 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.
Learn more about configuring payment plans.
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:
[restrict userlevel="shop_worker,shop_vendor"]
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.
Additional improvements
-
- “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).
Modified templates
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.
- card-update-form.php
- invoice.php
- paypal-express-confirm.php
- register.php
- register-single.php
- register-total-details.php
- subscription.php
- woocommerce-single-no-access.php
Upgrade to version 3.0
Version 3.0 is available today. The update can be installed directly from the Plugins page for all customers with a valid license. Do not have a license yet or need to renew a license? Head over to the pricing page to purchase one or to your account page to renew an existing license.