OK Try the below
$current = get_user_meta($user_id, 'continent', $true);
$categories = get_categories( $args );
foreach ( $categories as $category ){
?>
<label><input type="checkbox" id="type-<?php echo $category->name; ?>" value="<?php echo $category->name; ?>" class="shopping" name="top_level[]" <?php checked($category->name, $current); ?>><?php echo $category->name; ?> </label>
<?php
}
If $current = get_user_meta($user_id, 'continent', $true);
value is an array
then try the below
UPDATED for array
foreach ( $categories as $category ){
?>
<label><input type="checkbox" id="type-<?php echo $category->name; ?>" value="<?php echo $category->name; ?>" class="shopping" name="top_level[]" <?php if(in_array($category->name, $current)){ echo 'checked="checked"';} ?>><?php echo $category->name; ?> </label>
<?php
}
From your comment I see you used this <?php checked('. $category->name . ', $current, false); ?>
false shouldn’t be there as it won’t echo the checked string instead it return the checked string.