Yes, if you will be doing that with code. You will have to – add a Role (like free user).
Add this code (change code as needed for your work).
function update_roles_free_user() {
add_role( 'free_user', 'Free User', array( 'read' => true, 'level_0' => true ) );
}
add_action( 'init', 'update_roles_free_user' );
You can use the built-in WordPress function current_user_can.
if current_user_can('level_0'){
'do some stuff here'
};
or you can do it this way.
$user = wp_get_current_user();
$allowed_roles="free_user";
if ( array_intersect( $allowed_roles, $user->roles ) ) {
// Do Stuff Here
};
Or you can use the over-the-counter plugin: https://wordpress.org/plugins/members/
Here are your reference notes:
https://developer.wordpress.org/reference/functions/current_user_can/
https://developer.wordpress.org/reference/functions/add_role/
https://developer.wordpress.org/reference/functions/wp_get_current_user/