This plugin will “wipe” or “reset” the custom role and capabilities of plugins such as Connections, Easy Digital Downloads and Events Manager add on each update that is released for it. So if you receive the this error “You do not have sufficient privileges to access this page.” and have s2Member installed, here’s how to fix it.
Since custom roles in WordPress are persistent so Connections sets a “flag” in the options that if it exists will not attempt to recreate them which would reset them. Once this flag is set, there is no point and click way to force reset the Connections custom roles. Not even deactivating and deleting will reset this “flag”. With that said, there is a solution.
Install the Code Snippets plugin:
https://wordpress.org/plugins/code-snippets/
Create new snippet.
Add the following code to the new snippet:
add_action( 'init', 'cn_reset_role_capabilities' ); function cn_reset_role_capabilities() { if ( ! is_admin() ) return; // Class used for managing role capabilities. if ( ! class_exists( 'cnRole' ) ) require_once CN_PATH . 'includes/admin/class.capabilities.php'; cnRole::reset(); } |
Save and activate the snippet.
You should now be able to view all of Connections admin page.
! Important ! Deactivate the snippet.
Read more: