After much work, testing, and waiting, WP-Members 3.5.0 is finally ready for release. There are some big changes in how 3.5 is structured so you are going to want to test this beta on a development site before installing it on production.
Important Changes
These are the biggies. Make sure you understand what these changes are and how they affect you.
Updating from versions earlier than 3.0.0
You can no longer directly update from a version earlier than 3.0.0. Maintaining the pre 3.x update script made the process unwieldy. Less than 11% of the users are on a version earlier than 3.3.x and most of those are 3.2 and 3.1. 3.0 came out 10 years ago. If you haven’t upgraded since then, you probably need to start from scratch anyway.
Deprecated pluggable functions
WP-Members 3.5.0 changes the load order for the plugin. This changes how pluggable functions can be used. If you use any WP-Members pluggable functions and you load them from your theme’s functions.php file, this is no longer supported.*
*Technically, pluggable functions in general are no longer supported, but they are left in the plugin for legacy reasons.
Legacy Password Reset Obsolete
This should come as no surprise because it was stated when we went to version 3.4.0 that 3.5.0 would fully remove the old password reset. If you’ve installed during the 3.4.x cycle, this doesn’t matter to you unless you changed the password reset to legacy. But if you started using this plugin on a version prior to 3.4.0 and you haven’t changed how you handle the password reset, keep in mind that the legacy password reset (the old two field form) is now gone.
Legacy Login Error Obsolete
Similar to the above, this was mentioned quite awhile ago that this was coming. The login error message now completely uses the WordPress error message. Legacy messages are still used, but the display is done using the WP Error object class.
Removes Obsolete Files
There are some files that are obsolete but were maintained in the plugin for legacy reasons. These have been removed from the plugin. If you have a premium extension that is severely out of date (like not updated in the last 3 years), then issues may arise until you update the premium extension. But in general, if you’re running an up-to-date install, you’re fine here.
- Removes obsolete file /admin/tab-options.php. Users of the WP-Members User List extension version 1.9.4 and earlier will need to update the User List extension for full compatiblity.
- Removes obsolete file /inc/dialogs.php
- Removes obsolete file /inc/email.php
If you run a customization that calls one of these as an included file, you’ll need to update that code. In general, the plugin has relied on the inclusion of an API library for many years, so unless your customization code is five years old or more, it is unlikely that you have anything like this. All customizations discussed on the premium support site have favored the API rather than direct includes for many years.
Legacy stylesheets obsolete
The stylesheet selector is changing dramatically in this release. Previously, there were multiple stylesheets included and an option to select from those. This has been removed in favor of allowing for a direct path setting if anything other than the default stylesheet is desired.
Legacy stylesheets remain in the plugin package, so if they are selected, they will be used. However, now to identify a stylesheet other than the default, you can simply enter the URL of the custom stylesheet location.
The reason for this is because frankly, only a very small percentage of users ever messed with this at all, yet for that small number of users, it required special consideration on upgrade to maintain the setting. Further, the development of additional stylesheets stalled several years ago because hardly anyone was using the option. Development time is better spent elsewhere.
Bug Fixes
3.5.0 fixes a number of bugs. Some of these were also included during the 3.4.9.x releases, but are official for 3.5.0. Also, many of these are things that only show up in certain configurations of the plugin, so for a general default install, you may not have experienced any of these. But… keeping bugs out of the plugin is important to have a good, clean, efficient plugin that is easy to use so this covers all known bugs in the plugin.
Here is a list of the primary bug fixes in this version:
- Fixes login_link shortcode bug that caused an empty href value in the link.
- Fixes login double sessions.
- Fixes
wpmem_user_has_access()
bug that returned false when checking a specific user ID if run when no user is logged in. - Fixes
wpmem_user_is_current()
that throws a PHP error if the user does not have access to the required membership. - Fixes a bug when WooCommerce registration is used and WP-Members fields are set to be included, but no WP-Members fields are identified for inclusion.
- Fixes [wpmem_tos] shortcode if no URL is included in the attributes.
- Fixes membership check if the user does not have the queried membership.
- Fixes a bug when checking blocked posts via REST if checking for a post ID.
- Fixes a bug in checking WooCommerce product restriction to see if it is purchasable by the user.
- Fixes a bug in the install routine when checking if index.php files exist in the uploads folder.
- Fixes a bug in the [wpmem_user_membership_posts] shortcode that cased the title of the list to be whatever the title of the last post was (it should display the name of the membership as the title of the list).
New Features
- User registration/profile fields are now selectable for each state (reg/profile) in the Fields tab.
- If WooCommerce is enabled, registration/profile fields are selectable for inclusion in WooCommerce checkout, registration, and profile forms.
- Adds wpmem_create_file()
- Adds new login error message if user is not confirmed with link to request a new confirmation link.
- Adds a resend confirmation link form for the user.
- Adds a resend confirmation link action in the admin (hoverlink in Users > All Users).
- No longer installs default email content on clean install. (See next item below)
- Adds default email function for emails that are not completely set up.
- Adds a “novalidate” option by filter toggle to the reg/login forms (for disabling the default HTML5 validation on required fields).
- Adds formatting filters (wpmem_field_shortcode_multi_args, wpmem_field_shortcode_multi_rows, wpmem_field_sc_multi_html) for field shortcode to customize HTML when displaying multiple select/multiple checkbox field results.
- Adds ‘wpmem_user_profile_caps’ filter hook for customizing the required user capability to inlcude the WP-Members tabs (experimental until confirmed with other extensions).
- Adds custom object class to handle custom functions when the Import Users and Customers plugin is used and moderated registration or confirmation link settings are enabled.
- Adds wpmem_get_users()
- Adds direct shortcodes for and
that can be used in place of with the “login” or “reg” attributes.To gain full access to WP-Members premium content, a current support subscription is required. You can purchase an annual support subscription for as little as $59, which provides you with access to priority support, a customer support forum, access to code snippets, and more.
Why wait? Choose your subscription option here.
[Why join?] - Adds WP_CLI commands for creating and managing db views (views, create-view, drop-view).
- Improves previous WP_CLI commands, now translation-ready and adds inline documentation (which extends to commandline help).
- Code improvement: if user object is filtered in
wpmem_register_form_args
, the form values are based on the filtered user ID. - Code improvement: logout link in login shortcode uses
rawurlencode()
instead ofurlencode()
.
Security
- Interim security updates from 3.4.9.x series included and improved.
- Security audit of shortcode object class. Includes some of the updates from 3.4.9.x and expands on those. All shortcode inputs from attributes is sanitized, all output is escaped.
- Improved handling of user directories for uploaded files (when used).