-
Notifications
You must be signed in to change notification settings - Fork 0
Google Calendar Setup
The plugin reads Google Calendar to determine available appointment slots.
- Available windows: Days are open by default during configurable working hours (07:00–22:00). Events on the shared calendar matching a keyword (default: "Glow") extend availability outside those hours.
- Blocks: Events on your personal calendar, existing bookings, and admin time blocks are subtracted from the open windows.
- Slots: Free windows are sliced into bookable time slots based on session length + buffer time.
Default working hours and the open-by-default toggle live in Settings → Caswell Booking → Availability → Default Availability. To enforce tighter hours for a specific day of the week, enable that day in Weekly Schedule — an enabled weekly-schedule day replaces the default and any Glow windows for that day.
If you delete a booking event from the shared calendar (e.g., directly in Google Calendar), the hourly sync cron will detect the deletion within the next hour, mark the booking cancelled, remove the matching event from your primary calendar, and send cancellation notifications to both you and the client. The cancel link in the confirmation email and the WP admin Bookings page do the same thing immediately.
- Go to Google Cloud Console
- Create a project (or select existing)
- Enable the Google Calendar API
- Go to APIs & Services → Credentials
- Click Create Credentials → OAuth 2.0 Client ID
- Application type: Web application
- Copy the Client ID and Client Secret
- Go to OAuth 2.0 Playground
- Click the gear icon → check Use your own OAuth credentials
- Enter your Client ID and Client Secret
- In Step 1, enter scope:
https://www.googleapis.com/auth/calendar - Click Authorize APIs and sign in with the Google account that owns your calendars
- In Step 2, click Exchange authorization code for tokens
- Copy the Refresh token
Go to Settings → Caswell Booking → Google Calendar and enter:
| Field | Value |
|---|---|
| OAuth2 Client ID | From Step 1 |
| OAuth2 Client Secret | From Step 1 (encrypted on save) |
| OAuth2 Refresh Token | From Step 2 (encrypted on save) |
| Shared Calendar ID | The calendar containing availability events |
| Personal Calendar ID |
primary (or a specific calendar ID) |
| Availability Keyword | Default: Glow (case-insensitive) |
- Shared Calendar ID: Found in Google Calendar → hover over the calendar → three-dot menu → Settings → Calendar ID
-
Personal Calendar ID: Use
primaryfor your main calendar, or copy the specific Calendar ID
Instead of (or in addition to) calendar keyword events, you can define regular working hours in Settings → Availability → Weekly Schedule. When a day has a schedule enabled, it overrides keyword-based availability for that day.
- No slots showing: Check that the shared calendar has events with the keyword in the title for the selected date
- Token errors: Re-generate the refresh token via OAuth Playground
- Check logs: Enable debug logging in Settings → Tools tab
Getting started
How it works
- Architecture
- Database Schema
- Scheduling
- Google Calendar
- Notifications
- Email Deliverability
- Authentication
- AJAX Endpoints
Payments
Other