Skip to main content

Google Calendar Sync

WooCommerce Appointments supports two-way Google Calendar sync so site appointments push to Google and Google events can block availability.

Before You Begin

How It Works: When enabled, Google Calendar sync creates a bridge between your WooCommerce store and Google Calendar. New appointments automatically appear in the connected calendar, and existing Google Calendar events marked as "Busy" prevent double-bookings by blocking those time slots in your booking system.

What You Need:

  • A live website with HTTPS (this won't work on localhost or development environments)
  • A Google account (personal Gmail or Google Workspace)
  • About 10 minutes to complete the one-time Google Cloud Console setup

What Syncs:

  • ✅ Appointments created or updated in WooCommerce Appointments → Appear/update in Google Calendar (past and future)
  • ✅ Google Calendar events marked "Busy" → Block availability in WooCommerce Appointments (future events only)
  • ✅ Appointment changes in WooCommerce → Update Google Calendar

Two-Way Sync (when enabled):

  • ✅ Future Google Calendar event changes → Update corresponding appointments in WooCommerce
  • ✅ Future Google Calendar event deletions → Cancel corresponding appointments in WooCommerce
  • ❌ Past Google Calendar events (only events from now up to 1 year in the future sync back)

What Doesn't Sync:

  • ❌ Google Calendar events marked "Free" or "Available" (only "Busy" events block time)
  • ❌ Past Google Calendar events (only future events sync FROM Google Calendar to WooCommerce)
  • ❌ Changes to past Google Calendar events (won't update past appointments in WooCommerce)

Important Notes:

  • Each staff member can connect one Google Calendar
  • Google Calendar events don't appear in the WooCommerce admin calendar—they only block time slots
  • In two-way mode, changes to future events in Google Calendar will update WooCommerce Appointments
  • Past appointments can be synced to Google Calendar when created or updated in WooCommerce

1) Google Cloud Console Setup

Follow these steps to create and configure your Google Cloud project for Calendar API access.

Step 1: Create a Project

  1. Go to Google Cloud Console.
  2. Click the Project Picker (top left, next to "Google Cloud") or press CTRL+O.
  3. In the popup, click NEW PROJECT in the top right corner.
Project Picker
New Project Form
  1. Choose:
    • No Organisation (for personal Google accounts)
    • Your company profile (for Google Workspace accounts)
  2. Enter a project name (e.g., "WooCommerce Appointments").
  3. Click CREATE.
  4. Select your newly created project from the notification or project picker.

Step 2: Enable Google Calendar API

  1. Once the project is created and selected, open the menu (☰ top left) or press "." on your keyboard.
  2. Navigate to APIs & Services → Library.
  3. Type "Google Calendar API" in the search bar.

APIs & Services Library - Search

  1. Click on Google Calendar API from the results, then click Enable.

Enable Calendar API

The OAuth consent screen defines what users see when they authorize your app to access their Google Calendar.

  1. Go to APIs & Services → OAuth consent screen (or Google Auth platform → Branding).

Configure OAuth Consent Screen

  1. Choose User Type:
    • External: For public use (requires adding test users during development)
    • Internal: For Google Workspace organizations only (no test users needed)
  2. Click CREATE.

OAuth Consent Screen - User Type Selection

  1. Branding Information:

    Fill in the required branding details:

    • App name: Your application name (e.g., "WooCommerce Appointments")
    • User support email: Your email address

    OAuth Consent Screen - Branding

    • Developer contact information: Your email address
  2. Click SAVE AND CONTINUE.

  3. Data Access (Scopes):

    On the Data Access page (or step), click ADD OR REMOVE SCOPES.

  4. In the scope selection dialog, search for "calendar" and find https://www.googleapis.com/auth/calendar.

  5. Check the box next to the Calendar API scope and click UPDATE.

  6. Click SAVE AND CONTINUE.

  7. Add Test Users (if you chose External):

    • Click ADD USERS
    • Enter your Google account email address
    • Click ADDSAVE AND CONTINUE
  8. Review the summary and click BACK TO DASHBOARD.

OAuth Consent Screen - Finish

Important

If using External app type, you must add test users or the connection will fail. For production use, you'll need to publish the app (see Step 5).

Step 4: Create OAuth Client ID

The OAuth client ID and secret are the credentials your WordPress site will use to authenticate with Google Calendar.

  1. Go to APIs & Services → Credentials.
  2. Click + CREATE CREDENTIALSOAuth client ID.

Credentials Page - Create Credentials

  1. If you haven't configured the OAuth consent screen yet, you'll be prompted to do so first. Otherwise, you'll see the application type selection.

OAuth Client - Application Type Selection

  1. Select Application type: Web application and click CREATE.

  2. In the OAuth client creation form, configure:

OAuth Client Configuration Form

  • Name: Enter a name (e.g., "WooCommerce Appointments")

  • Authorized redirect URIs: Click + ADD URI and paste:

    https://your-site.example.com/wc-api/wc_appointments_oauth_redirect

    Replace your-site.example.com with your actual domain. This is required.

  • Authorized JavaScript origins:

    • Leave this field empty (recommended for most cases)
    • Only add https://your-site.example.com in rare cases if you encounter specific OAuth errors that require it
info

Authorized JavaScript origins is typically not needed for WooCommerce Appointments. Leave it empty unless you experience specific OAuth connection issues that require it.

  1. Click CREATE.

  2. Copy the Client ID and Client Secret immediately - the secret is only shown once!

OAuth Credentials Created

Critical

The Client Secret is only displayed once. Copy both values immediately or you'll need to create a new OAuth client.

Step 5: Publish the App (For Production)

If you're using External app type and want to avoid re-authentication every 1-2 days:

  1. Go to APIs & Services → OAuth consent screen.
  2. Scroll to Publishing status.
  3. Click PUBLISH APP.
  4. Confirm when asked "Push to production?".

Publish OAuth App

tip

For testing, you can skip publishing. For production use with External apps, publishing is required to avoid frequent re-authentication.

2) Plugin Setup (Store Level)

Now that you have your Google Cloud credentials, configure the plugin to use them.

  1. In WordPress admin, go to WooCommerce → Settings → Appointments → Google Calendar.

Google Calendar Settings

  1. Paste the Client ID and Client Secret you copied from Google Cloud Console.

  2. Click Save changes.

  3. Click Connect with Google. A popup window will open asking you to authorize the connection.

  4. Sign in with your Google account and click Allow to grant calendar access.

  5. After connecting, configure:

    • Calendar: Select a calendar for global sync (or leave empty for staff-only sync)
    • Sync Preference:
      • One-way: Store → Google (appointments sync to Google Calendar)
      • Two-way: Store ↔ Google (appointments sync AND Google events block availability)
    • Debug Log: Enable to record API activity for troubleshooting

Google Calendar Connected

  1. Use Manual Sync to trigger an immediate sync and view the last sync time.

3) Staff Synchronization

Each staff member can sync their personal Google Calendar independently:

  1. Go to Users → Profile (or edit a user with Shop Staff role).

  2. Find the Google Calendar Sync section.

Staff Google Calendar Sync

  1. Click Connect with Google and complete the OAuth flow.

  2. Select a Calendar for the staff member.

  3. Assigned appointments appear on their calendar; personal events block their availability.

tip

Staff-level sync works independently from store-level sync. You can use both together or separately.

Sync unpaid appointments

Google Calendar sync ignores unpaid appointments by default, but you can add the status with a filter in your child theme's functions.php.

add_filter( 'woocommerce_appointments_gcal_sync_statuses', 'bizzwoo_sync_unpaid_to_gcal' );
function bizzwoo_sync_unpaid_to_gcal( $sync_statuses ) {
array_push( $sync_statuses, 'unpaid' );
return $sync_statuses;
}

When this filter runs, unpaid entries are created/updated in the connected Google Calendar exactly like the paid appointments.

Troubleshooting

  • Events not appearing? Check "Last Sync" and trigger a manual sync.
  • Timezones: Align WordPress and Google Calendar timezones to avoid offsets.
  • Redirect URI mismatch: Ensure /wc-api/wc_appointments_oauth_redirect matches exactly in Google Cloud.
  • Scope not approved: On External consent screens, add your account as a Test User.
  • Connection expires: External apps in Testing mode require re-authentication every 1-2 days. Publish the app to Production to avoid this.