Change WordPress user roles and capabilities › Forums › Restrict or Permit access inside WordPress – how to › New role – admin access › Reply To: New role – admin access
Works now.
As we can se in class-wc-admin.php there we have the condition:
if ( ‘yes’ === get_option( ‘woocommerce_lock_down_admin’, ‘yes’ ) && ! is_ajax() && basename( $_SERVER[“SCRIPT_FILENAME”] ) !== ‘admin-post.php’ && ! current_user_can( ‘edit_posts’ ) && ! current_user_can( ‘manage_woocommerce’ ) ) {
$prevent_access = true;
}
where woocommerce_lock_down_admin is deprecated and defaults to yes in all cases. So what would actually be necessary to allow a user to edit posts or manage woocommerce so the backend works.
Perhaps you include your filter in the next version of the role editor plugin os it works for all people without custom code.