The WP-Members 3.5.5 release is primarily a feature update moving towards 3.6. There are also some bug fixes and security updates.
Get the WP-Members 3.5.5 beta release candidate here.
Bug Fixes
wpmem_get_user_count_by_role()– fixed a bug that caused the function to return a total count of users no matter which role was requested.- Fixed a bug for the image field display in the user profile.
Security Updates
This release wraps together the previous minor patch releases 3.5.4.1, 3.5.4.2, 3.5.4.3, 3.5.4.4, and 3.5.4.5. Most of those were “behind the scenes”, and you can review those release notes for details. The most recent, 3.5.4.5, changes the user uploaded files directory structure. If you do not use a file upload field in your registration or profile form, then this patch does not affect you. However, if you use either file or image field in the form, you will want to consider upgrading the directory structure of existing files. Changes in the plugin will use the new structure for all new uploads, but existing files will need to be moved using a utility tool.
There are two options to do the upgrade if it is necessary: using WP CLI (recommended) or through the admin panel. If you look at the WP-Members admin panel and there is no tab that says “Filesystem”, then you do not have any files that meet the move criteria.
Feature Updates
This version adds two new filter views to the Posts > All Posts screen to filter the view by restriction status or membership status.
There is a new setting if WooCommerce is installed to allow you to implement the WooCommerce password reset link in the WP-Members forms.
Sorting arguments were added to the [wpmem_user_membership_posts] shortcode and the wpmem_get_membership_post_list() function.
Date format support was added to the wpmem_get_user_expiration() function.
wpmem_show_membership_posts_sc_list_item is a new filter for the [wpmem_user_membership_posts] shortcode to filter the list output.
New API functions include:
wpmem_is_user_deactivated()– give it a user ID and it will return a boolean for whether the user is marked as deactivated or not.wpmem_get_user_time_remaining()– give it a user ID and a membership meta key and it will return the time remaining on the membership.
Code improvement in the following API functions:
wpmem_get_membership_role()– updated to return false rather than null if there is no role for the membership.wpmem_logout_link() - now consolidated throughout the plugin so there is asingle instance of thewpmem_logout_linkfilter hook.has_access()logic improved for better handling of role-based memberships.
WP CLI Updates
There were a number of updates to the WP CLI commands. I highly recommend use of WP CLI for regular maintenance tasks for WordPress in general as it simplifies and allows more resource intensive processes to be run than could be handled through the web interface.
wp mem membership create– can create a new membership from given arguments.wp mem user list memberships– lists a user’s memberships.wp mem user expires --membership=<meta_key> --id=<user_id>– displays a user’s expiration date for a given membership.wp mem user remaining --membership=<meta_key> --id=<user_id>– displays time remaining on a membership for the requested user. Can use--interval=<days|months>to display the result as days remaining or months (default: days).