Hi @abdobasha2004,
Currently, the only way to do this would be to give access to all the screens (except the Settings, which are only for the Administrators). I have a WordPress filter called “mwai_allow_usage” you can hook into, and you can return true if the current user is a standard user. That would work 🙂
In the plugin, you can see that hook implemented in the core.php file, in the can_access_features function.
I am sorry I am lost here.
Can you please give me the code to put in functions.php?
Or you mean I should edit the file of the plugin core.php?
Thank you so much.
I tried this code in functions.php but did not work!
function allow_standard_users_to_use_plugin( $allow_usage ) {
if ( current_user_can( 'author' ) ) {
return true;
}
return $allow_usage;
}
add_filter( 'mwai_allow_usage', 'allow_standard_users_to_use_plugin' );
Am I missing something?
Can you try to add it through the Code Snippets plugin? I had feedback from some of my users that it worked better with it (it might be that the functions.php might be ran too late or too early, I am not sure)
I tried code snippet too, unfortunately not working :/
The snippet works, just make sure to use it in a plugin. Either create a new plugin and run it, so it can be trigged very early.