Add near top of api/clock-in.php:
require_once __DIR__ . '/includes/geofence-helper.php';

Replace old outside-radius reject logic with:

$geo = wcps_geofence_status(
    isset($clockInLatitude) ? (float)$clockInLatitude : null,
    isset($clockInLongitude) ? (float)$clockInLongitude : null,
    isset($worksiteLatitude) ? (float)$worksiteLatitude : null,
    isset($worksiteLongitude) ? (float)$worksiteLongitude : null,
    isset($allowedRadiusMeters) ? (float)$allowedRadiusMeters : 150.0
);

$clockInStatus = $geo['status'];
$clockInDistanceMeters = $geo['distance_meters'];

if ($clockInStatus === 'REJECTED') {
    echo json_encode([
        'success' => false,
        'message' => 'Clock-in failed: ' . ($geo['reason'] ?: 'Invalid location')
    ]);
    exit;
}

IMPORTANT:
Remove any code like:
if ($clockInStatus === 'OUTSIDE_RADIUS') {
    echo json_encode([
        'success' => false,
        'message' => 'Clock-in rejected. You are outside the allowed worksite radius.'
    ]);
    exit;
}

Save session normally using:
- clock_in_status = $clockInStatus
- clock_in_distance_meters = $clockInDistanceMeters
