WP-Members 3.5.0 was released last week as a major update. This version had substantial changes and improves features, options, security, and a host of other things. It further integrates with WooCommerce in ways that the previous builds did not. It allows direct control over what fields display in the registration form versus the profile update form without having to customize.
There were a few bugs in the original update. All reported bugs have been addressed and fixed, along with a couple that I found while addressing reported issues. All of those have been packaged into the 3.5.1 version which is now released.
Here is a list of the bugs in 3.5.0 that are addressed in the 3.5.1 release:
- Broken [[fields]] shortcode in the admin notification email. This was probably the most commonly reported issue. This has been fixed, and actually, I added some improvements to the entire script that builds the notification email. There are some additional improvements I started working on as well, but I did not want those to hold up getting the bug fix released, so additional improvements to the emails screen will come in a future version.
- Missing file
class-db-tools.php
. This file should have been namedclass-wp-members-cli-db-tools.php
. This primarily affected use of WP-CLI as well as background updates. The file is properly renamed in 3.5.1. - Double textarea input for select, multiselect, multicheckbox, and radio field types. This was the result of some interface improvements for the Fields admin tab. It is fixed in 3.5.1.
- PHP fatal error (code execution halt) updating the Shortcodes admin tab. The setting actually updated, but there was still a PHP fault. Fixed in 3.5.1.
- Fields not properly processed (saved) when adding a user through the Users > Add New screen. This actually led to discovery of some form field and data issues with native WP registration and some of the WooCommerce forms. These are all addressed and fixed in 3.5.1.
Improvements
This update addresses a whitespace issue that has been in the plugin ever since the dropdown select field type support was added. There has always been an issue if you placed whitespace between the saved value and the display value like this:
dropdown_saved_value| some displayed value,
Note the problem was not space in the display value, but around the delimiter. This version fixes that by cleaning up whitespace when it saves the settings.
Another improvement is that the password reset will use the esc_url_raw()
function to escape the password reset link instead of esc_url()
. The esc_url()
function was reported to result in problems with the Safari browser and on mobile (and possibly in other instances). I was not able to reproduce the issue as a bug, but switching which WP function was used to escape the value did resolve it for those that reported a problem.
The admin email notification, since I was fixing the [[fields]] shortcode problem, I addressed an issue that puts a hard <br>
HTML tag after each field when HTML email is enabled and individual fields are displayed in the email by shortcode. That break tag was intended so that there would be a line break after the field. However, that really should be done in the HTML markup being used for the email. Having it in there caused problems if an individual field was used somewhere like the subject line where the HTML break tag is not supported. So this update removes that tag.
New API functions:
- wpmem_get_file_field_url()
- wpmem_get_field_type()
- wpmem_get_field_label()
- wpmem_is_file_field()
- wpmem_is_field_required()
Obsolete elements
This version does make the $field_arr
array key in the admin notification email filter obsolete. It is replaced by $fields
. I don’t believe anyone is using the old array key for customizing. It’s not documented and I’ve never used it in an example (that I know of). If you run into issues with this obscure element as a result of this change, change the key to $fields
.