<?php
if (!defined('ABSPATH')) exit;

function stakmv_user_is_vendor($user_id = null) {
    $user = get_userdata($user_id ?: get_current_user_id());
    if (!$user) {
        return false;
    }
    return in_array('stakmv_vendor', (array) $user->roles, true);
}
