As I previously posted, WP-Members 3.3 is in development and the bleeding edge package is available for testing (see: WP-Members 3.3.0 Development).
I’ll note here some additional features and updates that been worked on since the original post.
New API Functions and Hooks
Here are some API functions and filter hooks that have been added to the plugin:
- Added wpmem_activate_user() and wpmem_deactivate_user() to user API.
- Added wpmem_user_sets_password() API function (name subject to change in final production)
- Added wpmem_get_block_setting() API function.
- Added wpmem_set_user_status() API function.
- Added wpmem_user_has_meta filter.
- Added wpmem_login_form_settings filter (“_settings” tag subject to change in final production)
- Added wpmem_block_settings filter (“_settings” tag subject to change in final production)
- Added wpmem_msg_settings filter (“_settings” tag subject to change in final production)
Note these haven’t been documented externally yet, but the inline documentation is there for each.
User Product Access Meta Keys Change
There will be a significant change to the user membership product access meta values in 3.3. This will facilitate a number of improvements, including handling of renewal notifications in the WooCommerce extension.
Currently, all user memberships are stored as a single meta that is an array of each membership and (if applicable) expiration date as a MySQL timestamp.
Beginning in 3.3.0, this will change to a single meta key for each membership with the expiration date as a UNIX timestamp (epoch time).
The plugin update will handle converting existing users to the new format. The old format will be maintained both in upgrade AND for any functions the plugin handles. This will make rollback possible if necessary. At some point the old format will be dropped entirely, but it will continue to be maintained for now just to facilitate any issues with upgrades.
Updates to User Registration
A big chunk of the user registration process is being moved into separate functions hooked to WP’s ‘user_register’. This will allow a number of improvements.
First, individual processes can be loaded or unloaded on a custom basis without affecting the plugin (using “remove_action”). Second, it will more tightly integrate with other applications using the WP native process (wp_insert_user()).
It is important to note this is a significant change in some aspects. For some (hopefully most) users, it will be seamless and unnoticeable. For others, it may require some updates to existing customization. There will be significant testing necessary so if you currently use WooCommerce for registration or something other than WP-Members that also uses the wp_insert_user() function and/or user_register action hook, please test the development release (although not on a production site as of yet) and report any issues.