This is stored in the user meta table under the rich_editing
meta key for each user.
You could one of these (untested):
1) Add it for your specific users, e.g. via
`add_user_meta( $user_id, 'rich_editing', 'true', true );`
2) Within the wp_default_editor()
function, that determines the default editor, the user_can_richedit()
function is applied.
It checks for get_user_option( 'rich_editing' ) === 'true'
, among other things.
It’s filterable through the user_can_richedit
filter:
/**
* Filters whether the user can access the rich (Visual) editor.
*
* @since 2.1.0
*
* @param bool $wp_rich_edit Whether the user can access to the rich (Visual) editor.
*/
return apply_filters( 'user_can_richedit', $wp_rich_edit );
3) Try to filter the get_user_option( 'rich_editing' );
if it’s missing.