Connect a Google account
TheBooking reads and writes Google calendars through the Google accounts connected to the site. An administrator connects accounts for the site. Providers can connect their own accounts, when you allow it.
Before you start, complete the Google project setup.
Connect an account as an administrator
- Open Availability > Calendars.
- Select Connect account.
- In Connect a Google account, select Continue with Google.
- Sign in to Google and grant the requested Calendar permissions. If Google says that it hasn't verified the app, see If Google hasn't verified the app.
- Back in WordPress, Add calendar opens on the calendars of the new account. Select the calendars TheBooking can use, and then select Add calendar. With several calendars selected, the button shows their number, for example Add 2 calendars.
To add more calendars later, select Add calendar on the account.
When providers are enabled, an account that an administrator connects is a team account: its calendars apply to all providers, until you limit a calendar to a sub-team. To make it the personal account of one provider, open the More actions menu of the account and select Assign to a provider…. See Google accounts and providers.
Adding a calendar only makes it available. Its role, source, blocking, or destination, is chosen in each availability plan: see Providing availability, Block availability, and Create events after reservation.
If Google hasn't verified the app
The Google application of TheBooking is yours: you created it in your Google Cloud project, and it connects your Google accounts to your site only. Until Google verifies it, Google shows Google hasn't verified this app to everyone who connects an account, administrators and providers. Most sites never submit the application for verification: the warning is expected, and you can go past it.
- Check the developer's email in the warning: it is the contact of your Google Cloud project. If you don't recognize it, select Back to safety and stop.
- Select Advanced.
- Select Go to followed by the name of the application, and (unsafe), for example Go to Booking system (unsafe).
- Continue the sign-in and grant the Calendar permissions. When Google lists the permissions with a checkbox each, select all of them: without them, TheBooking cannot read the calendars or write the bookings.
Before you let providers connect their own accounts, tell them about the warning, and give them the developer's email to check. To remove the warning, submit the application to Google for verification: see Audience and publishing status.
Let providers connect their own accounts
- Open Settings > Integrations > Google Calendar.
- Turn on Let providers connect their own Google account. The setting is available when providers are enabled, and it is off by default.
A provider then opens Availability > Calendars, selects Connect account, and signs in to Google. The account is the provider's personal account: its calendars apply only to that provider. The provider can add its calendars, and disconnect the account.
Each provider sees only their own accounts. A provider sees the Calendars tab when the setting is on, or when an administrator assigned an account to them. With the setting off, the provider sees the assigned accounts but cannot connect or disconnect accounts.
Allow it only for WordPress roles you trust: a provider's calendars change the availability of the plans that use them.
Keep availability in sync
Each account card in Availability > Calendars has a Live updates switch, off by default. With Live updates on, TheBooking keeps a synced copy of the calendars of the account, and Google notifies the site when they change, instead of TheBooking reading them from Google at every visit. Live updates need a public HTTPS site, and only administrators can turn them on. See Live updates.
Remove an account
To remove an account, select the disconnect button of the account, Disconnect followed by the account's email, and then select Disconnect to confirm. Administrators can always disconnect accounts. A provider can disconnect their own accounts when Let providers connect their own Google account is on. Removing an account also removes its calendars from the site and from the source, blocking, and destination roles of every plan. Nothing is deleted in Google Calendar. Its Live updates choice is removed too.