Is it possible to hide or show custom fields by user's role.
For example: I have custom field "wholesale_notice" and it have to be visible only for my "wholesale" user role.
Thanks
Yes, it is possible to hide or show custom fields by user's role. Use current_user_can() for finding current user role. This function returns true if current user has capability or role. For example your current user is "wholesale" then you can use like this:
<?php if( current_user_can('wholesale')) { ?>
// stuff here for wholesale
<?php } ?>
For more reference check this: https://codex.wordpress.org/Function_Reference/current_user_can