Authorize Membership in front end missing
-
V2.1.7 seems to have introduced a bug. For a designated user role to be able to Approve/Reject a membership application in the front end, by editing the user’s profile, this requires the the option “manage_options” be enabled for the approver’s role. However, checking it does not stick and it gets cleared automatically on role update.
This is being caused by new code in \includes\core\class-roles-capabilities.php that adds an action on “update_option” and a new function “um_on_roles_update”.
I was unable to determine why this capability in particular gets cleared when others don’t. But I temporarily patched it, around line 57://if ( ! empty( $role_meta['wp_capabilities'][ $cap ] ) ) { if ( $cap != "manage_options" && ! empty( $role_meta['wp_capabilities'][ $cap ] ) ) {
This fixed the problem but if it’s the right way to do it I don’t know. Hopefully the developers will determine the issue and fix properly.
Without being able to set manage_options only administrators can approve memberships and it cannot be delegated to other roles.
- The topic ‘Authorize Membership in front end missing’ is closed to new replies.