Jul 06, 2023 12:59 pm
Non admin members are unable to upload attachments using the paid addon. This error shows when trying to add files But works fine for admin.
1 Reply
Jul 06, 2023 1:14 pm
Found the issue, this code was running in snippits:
function restrict_dashboard_access() {
if (is_user_logged_in()) {
$current_user = wp_get_current_user();
$user_roles = $current_user->roles;
if (!in_array('administrator', $user_roles)) {
wp_redirect(home_url());
exit;
}
}
}
add_action('admin_init', 'restrict_dashboard_access');
This was stopping the upload feature.