You asked – RocketGeek listened!
WP-Members 3.4.0 is released today and it packs the biggest updates and changes that I have released in quite a while.
Most of the features are based on either direct user requests or on refining aspects of the plugin that users have given feedback on. And not only are there new and improved features, but as usual, when I reach a major plugin update (i.e. 3.3.x to 3.4.x), I do a complete code review to make sure the plugin’s codebase does not become unnecessarily bloated and to find areas that code can be tightened and improved. That includes a complete security audit as well.
Here’s a rundown of what is in store for you in WP-Members 3.4.0!
HTML Email option
Ever since the inception of the plugin, I have followed WP in that the plugin sends plain text emails by default. But seriously… who uses plain text email anymore? WooCommerce sends HTML by default, and has for years. So why not WP-Members, too?
And other than troubleshooting email sending issues, how to implement HTML emails has been the next most common support question when it comes to email.
You’ve actually always had the ability to make the plugin send HTML email, but it required setting up a custom filter to change the email type in the headers. Now, 3.4.0 has a direct option to enable the plugin to send email in HTML format. In addition, when the HTML option is enabled, the email editor window will include WP’s visual editor. You can either use the visual editor for formatting, or you can switch to the raw text view and put in HTML markup directly. It’s your choice.
More Membership Options
One of the biggest questions asked is “does the plugin offer membership levels?”
When I introduced membership products into the plugin, I wanted them to be non-hierarchical. I didn’t want them restricted to linear concepts, preferring to have them be completely flexible so they could be used in any way the end-user wanted them to be. But that design didn’t account for “nesting” content by membership and to mimic a hierarchy or a “tree”, you had to tag any membership a post/page might be limited to. There wasn’t a built-in way of incorporating all the content assigned to one membership into another membership, such as “all content limited to the silver membership is included by default in the gold membership.”
Now the plugin can do that!
3.4.0 incorporates hierarchical stacking of memberships so that you can easily create concepts of “levels.”
But that’s not all!
Using hierarchy in memberships also allows flexibility when selling memberships through WooCommerce (especially with the WP-Members Memberships for WooCommerce extension). Now you can create variable products and sell different expiration times for the same membership.
Also in the membership options, the dialog for custom post restriction has been given an upgraded editor.
Changes to (new) feature settings
Password reset default
In 3.3, a new password reset process was introduced as a new feature option. When that was included, it was announced that this would eventually become the standard process. With that announcement, I indicated that the switch would be 3.4.0, with the old password reset process remaining as an option until 3.5.0 for users who may need more time to switch over.
For users who have enabled the new process in a previous version (i.e. 3.3.x), you don’t need to do anything. For those that have not, you a couple of changes to take care of before 3.5.0 comes out. You will need to disable the legacy password reset option under the WP-Members Options > New Feature Settings.
Note that for existing installs, the emails are untouched during the upgrade process. If you have not switched over to the new method for each of these emails, you will want to update the password reset email appropriately. New (clean) installs where no WP-Members settings exist have new default email content that fits the new defaults.
You have until plugin version 3.5.0 to fully switch over to the new process at which time the plugin will no longer support the legacy password reset.
Email confirmation link
The email confirmation link process has been fully incorporated but will remain an optional feature. The setting is moved into “Other Settings”.
There are a number of improvements in the plugin that for the most part will be invisible to most users:
- When/if used, Google reCAPTCHA version 3 can optionally be displayed on all pages. Google recommends this to improve the user score, which is used to pass the captcha.
- The array of post IDs for hidden posts is now saved in a settings option rather than a transient. This is a performance improvement update since it only has to be set once (essentially, when any post is marked as hidden) instead of updating the transient at a given time interval.
- Changed the user count transients used in the Users > All Users screen to expire in 5 minutes. Previously, the transient would expire in 30 seconds. The longer period will result in fewer runs of the query. The queries used to generate these are not individually overbearing, but when several are combined (especially when there are multiple membership groups), it can be a larger load.
Other improvements that are not necessarily “front and center” but none-the-less are enhancements of the feature set:
- Now you can view forms on blocked content in the Customizer, not just the shortcode pages. Previously, I had only set this up for the shortcode pages as it was intended to be used for applying custom styles via the Customizer. However, as some users have noted, what if you don’t use a specific login or registration page? Or what if the styles on blocked content are different than on pages using the shortcode (usually “posts” vs “pages”)? Well, now you can view the logged-out state of the forms from any post or page regardless of whether it’s a shortcode or if it’s blocked content.
- Improved the “redirect_to” handling in the login and registration forms. You can now specify a page by slug alone rather than a full URL. This will allow for easier portability across environments (i.e. from a dev/staging URL to production).
There are a couple of items in the plugin that for enhancement’s sake underwent a major rebuild, most of which will be unnoticeable but will incorporate enhanced extensibility for customization:
- The user export function was revamped to allow for extensibility and customization. It is also now part of the user API rather than simply the admin. It will function the same as it did before so the changes are seamless. But now it will be a callable function, and contains better filter hooks for customizing what fields are included.
- The login widget was rebuilt to allow for more customization. It might take another round of updates, but the intended result is for the form builder to be the same as the main body login so that the process of customizing the form and general HTML is the same across both types of form. One change is that all of the text string tags (used to identify what text is called by wpmem_gettext()) have been changed from having a stem of “sb_” to “widget_”. The “sb_” stem is a holdover from years ago when all of this as part of “the sidebar”, but modern WP doesn’t necessarily make that distinction. So since it was being revamped, I figured it was high time to change that. There are some handlers in the dialogs functions to convert legacy stems with “sb_” to “widget_” for backward compatibility (such as for the WP-Members Text Editor).
- There has been some shifting around of how dialogs are handled, so there will be more to come in the user API for customizing how the plugin handles messaging.
Lastly, in terms of improvements, the “post restricted” message that displays over blocked content never had any separate HTML markup. Recently, with certain themes, this has led to making it difficult to customize the display of the message. So as of 3.4.0, the message has a div wrapper with the ID “wpmem_restricted_msg” (which you can target in CSS with #wpmem_restricted_msg).
Deprecated features and functions
Clone menus deprecated
The “clone menus” feature has been officially deprecated! If you do not use this setting, don’t worry about this as it will simply no longer show as an option.
If you DO use clone menus, you will have until version 3.5.0 to shift over to individual menu item management. The clone menus setting will show for you, but once it is disabled, it will disappear from your settings and cannot be re-enabled.
The clone menus option was
Legacy functions removed
There are a number of old, legacy functions that were removed from the plugin. As none of them were ever intended to be user API functions, their removal should not affect a typical installation. However, since their use extends back to earlier days of the plugin, there may be the rare case of someone using them in a custom application. So note that the following have been removed:
This release fixes a few actual bugs:
- Fixes a bug in the signon process that caused the “remember me” option to be ignored.
- Fixes a bug in the
wpmem_is_blocked()function that returns false when checking a specific post ID.
- Fixes a bug in the
autoexcerpt()function that caused a double “read more” link when the excerpt length was set to zero.