We’re so excited to finally bring you the beta for Restrict Content Pro version 3.4. It includes some very exciting new features, including: the ability to toggle auto renew off and on with Stripe, a new payments importer tool, new logging functionality, the ability to have discounts apply to signup fees, a bug fix related to renewal expiration dates, and more!

How to test the beta

In order to help ensure the final release of 3.4 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:

Opt in to Restrict Content Pro 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.

See our FAQ if you have any questions or issues updating to the beta version. If you encounter any bugs, please let us know through our support page.

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.

Auto renew toggle for Stripe

This is our first Stripe-only feature. Until now, we’ve tried to make features consistent across all gateways, but this ultimately held us back from adding more advanced features that some payment gateways don’t support. We’ve decided to start deviating from this and introduce features for some gateways only.

This new auto renew toggle feature is only available if your auto renew settings are set to “Let customer choose whether to auto renew”.

Auto renew setting set to "Let customer choose whether to auto renew".

When a customer with a membership views their account details, they’ll see a new option to “Enable auto renew” (or “Disable auto renew” if already enabled).

Link to "Enable auto renew" in customer account area.

When a customer clicks “Enable auto renew”, a new subscription is automatically created for them inside Stripe. The customer does not have to go through the registration form or enter card details again; it all happens automatically. The subscription is scheduled to start on the membership’s current expiration date, so the customer is not billed immediately.

When a customer clicks “Disable auto renew”, the existing subscription in Stripe is cancelled. However, the membership remains “active”. This isn’t treated like a full cancellation, but rather an updating of auto renewal preferences.

Site admins will also see a subtle change when editing Stripe memberships within the dashboard. If you edit a membership that does not have auto renew enabled and check on the “Auto Renew” box, you will see this notice appear:

Admin notice reading: "Enabling Auto Renew: A new subscription will be created at the payment gateway. The customer will be automatically billed $100.00 on: August 16, 2021."

This is just the first of many features that greatly improve the ability to manipulate membership settings and have that information sync back to Stripe.

Payments import tool

Restrict Content Pro has had the ability to export payments for a long time, but never to import them. This feature has finally been added in version 3.4. Navigate to Restrict > Tools > Import > Payments to get started.

Interface for importing payments from a CSV file.

New logging functionality

We’ve added a new database table called wp_rcp_logs. As its name implies, this table holds activity logs. Right now we add an entry whenever a membership is renewed, cancelled, and expired. While it doesn’t do a whole lot right now, we have some exciting thoughts on how to utilize this in the future.

If you’re a developer and want to start adding your own logs, you can do that with our new function RCP\Logs\add_log(). For example:

RCP\Logs\add_log( array(
	'object_type' => 'membership',
	'object_id'   => $this->get_id(),
	'user_id'     => $this->get_user_id(),
	'type'        => 'membership_cancelled',
	'title'       => __( 'Membership cancelled', 'rcp' ),
) );

Discounts can now optionally be applied to signup fees

Until now, discounts never applied to signup fees. If you had a membership level that was $10 with a $50 signup fee and applied a 50% discount, the discount would only be applied to the $10. The total price would then be $55, using this calculation:

($10 / 2) + $50

Version 3.4 introduces a new setting that allows you to change this behavior.

New setting called "Discount Signup Fees".

If enabled, discounts will be applied after signup fees are added, which means in the previous example the total amount due would be $30, using this calculation:

($10 + $50) / 2

Bug fix: expiration dates when manually renewing an active membership

We don’t usually highlight bug fixes, but this one is something a lot of you have been waiting on for a long time. If someone had a non-recurring active membership, then manually renewed but this time chose to auto renew, their expiration date would be recalculated from today instead of extended. For example:

Let’s say “today” is August 1st, 2020. A customer has a monthly membership due to expire August 15th 2020. They choose to manually renew and select auto renew. Previously, their new expiration date would be set to September 1st 2020 (today + one month). This wasn’t ideal because it meant the customer technically lost time they’d previously paid for. In version 3.4, the customer will be billed for the renewal today, but their expiration date will be extended to September 15th 2020 (existing expiration date + one month).

Unfortunately were weren’t able to add this fix to all payment gateways. The following gateways received this fix:

  • Stripe
  • PayPal Standard
  • PayPal Express
  • Braintree
  • Manual gateway (not applicable because it doesn’t support auto renew, but it still works here)

Full changelog

  • Modified templates: card-update-form.php, paypal-express-confirm.php, register-single.php, register-total-details.php, register.php, subscription.php
  • New: If auto renew is set to let the customer decide, then customers can now easily toggle auto renew off and on via their account page. This feature is available for memberships paid through Stripe only.
  • New: Added a payments importer tool (Restrict > Tools > Import > Payments).
  • New: Added an option to allow discounts to apply to signup fees.
  • New: Added a new wp_rcp_logs database table and associated logging functions.
  • New: Introduced an RCP\Membership_Level class for membership level objects.
  • Improvement: You can now export all memberships at once (previously you had to select a specific status to export).
  • Improvement: Updated French translation.
  • Improvement: Custom database table versions have been added to the System Info file. This will help our support staff determine if there are database upgrades that haven’t run on your site.
  • Improvement: Adjusted the description of the %member_id% email template tag.
  • Improvement: Capitalize first letter in card brand on the card update page (e.g. “Visa”).
  • Improvement: The [rcp_update_card] shortcode now supports multiple memberships. Navigation has been added to the top of the shortcode so the customer can choose which membership they want to update the card details for.
  • Refactor/Dev: Membership level database table has been updated to use BerlinDB.
  • Refactor/Dev: All database tables with datetime columns now use null as the default value instead of 0000-00-00 00:00:00. If you’re using our object classes and functions then there is no difference in behavior/values.
  • Refactor/Dev: Added component registry for all our custom tables.
  • Fix: Incorrect expiration date when renewing an existing active membership and selecting auto renew. This fix has been applied to the following payment gateways: Stripe, PayPal Standard, PayPal Express, Braintree, and Manual.
  • Fix: Admin assets were being loaded on custom post type pages that RCP doesn’t support.
  • Fix: Remove usages of $ instead of jQuery in admin scripts. This was causing conflicts with certain third party plugins.

Release date for 3.4

The beta version of 3.4 is available today. We don’t yet have a date for the final release, but we’ll keep you posted!

Ashley Gibson

About the author: Ashley is the development lead for Restrict Content Pro. When not working on Restrict Content Pro, she enjoys weightlifting and reading.

Leave a Reply

Your email address will not be published. Required fields are marked *