Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
625 B
16
Indexable
Never
function is_agent($user_id){
	$agent_group = get_user_meta($user_id,'salesking_group',true);
	if ($agent_group !== 'none' && !empty($agent_group)){
		return true;
	} else {
		return false;
	}
}


function is_subagent($user_id){
	$parent_agent = get_user_meta($user_id,'salesking_parent_agent',true);
	if ($parent_agent !== 'none' && !empty($parent_agent)){
		return true;
	} else {
		return false;
	}
}

function customer_has_agent($user_id){
	$assigned_agent = get_user_meta($user_id,'salesking_assigned_agent',true);
	if ($assigned_agent !== 'none' && !empty($assigned_agent)){
		return true;
	} else {
		return false;
	}
}