Black Friday & Cyber Monday SUPER SALE ALL WEEK:
Grab 40% OFF on plugins
Days
Hours
Minutes
Seconds

How to Allow Third Party WordPress Plugins to Communicate With Your Google Calendar

Have you ever tried to setup your google calendar to sync with a WordPress plugin? Or for that matter any third party plugin/app?

We made the Booking & Appointment Plugin for WooCommerce compatible with Google Calendar more than a year ago. After which, we’ve had a few support requests from customers mentioning an issue where they are unable to setup their google calendars to allow creating/editing of events by third party plugins.

This is especially needed when we want a third party plugin (like the Booking plugin) to automatically add/edit/delete events in our calendars and make sure the calendars are in sync with the website data.

The below post uses the Booking & Appointment plugin as an example for a third party plugin. However, the instructions can be followed for any third party plugin which is trying to sync their data with google calendar.

In the case of the Booking plugin, after following all the steps mentioned in Booking->Settings->Google Calendar Sync->Admin Calendar Sync Settings->Sync Automatically->Show me how, the user still receives a Test Connection failed message.

google calendar on wordpress
Test Failed

When trying to setup automated export to google calendar from the Booking plugin, the Service Account Email Address needs the permission to be able to ‘Manage all changes to events’ instead of simply allowing it to the able to ‘See all event details’.

Sometimes this permission defaults to ‘See all event details’  instead of ‘Make Changes to events’ in the Google Calendar->Calendar Settings->Share this Calendar tab.

Share Calendar - How to allow WordPress plugins to communicate with your Google Calendar
Share Calendar

As a result, the plugin/app is unable to create events in your google calendar even though all the details entered are correct.

This can happen when your Gmail account does not have the permission to setup other users to allow edit access to the calendars.

This can happen for any plugin or app that is trying to sync the events with your google calendar. Hence, the first action that needs to be taken is to make sure our users have all the permissions and the setup is correct. This is seen mostly in accounts created for domains. For e.g. my email account pinal at tychesoftwares dot com does not have this permission.

So even though I follow all the steps in the Booking plugin listed in Booking->Settings->Google Sync Settings->Sync Automatically->Show me how, I’m unable to successfully setup a connection from the site to the calendar created in my account pinal at tychesoftwares dot com.

This can be fixed by the admin user (in this case vishal at tychesoftwares dot com). The admin has the ability to change the settings. All the below mentioned steps need to be performed by the admin user.

Steps to allow third party WordPress plugins to communicate with your Google Calendar

Step 1: Access your user account.

1. Go to admin console of your Google business email account

How to allow WordPress plugins to communicate with your Google Calendar
Admin Console in gmail

2. Click on Users
3. Click on the user whose account you want to create the Calendar settings for. In this case it will be Pinal Shah

How to allow WordPress plugins to communicate with your Google Calendar
Users

Step 2: Access the Calendar app

1. Click on the link View active Google apps and services

How to allow WordPress plugins to communicate with your Google Calendar
View Google Apps

2. It will display the apps which are enabled for that user. Please click on Calendar app. If you don’t see the Calendar app here, then you will need to turn it on or enable it.

How to allow WordPress plugins to communicate with your Google Calendar
Apps List

Step 3: Access and modify the Sharing settings.

1. Click on the Sharing Settings link.

Calendar App
Calendar App

2. On that page, in the External sharing options for primary calendars field, please select: Share all information, and outsiders can change calendars.

Calendar Settings
Calendar Settings

Once the changes were made, I was able to setup the Service Account Email Address with the permission ‘Make changes to events’ and run the test connection successfully on pinal at tychesoftwares dot com.

Test Successful
Test Successful

Most of the times, these changes are enough to get the Calendar API working. However if it still doesn’t work, you can try one of the below two options or both as needed to help fix the issue.

Even after modifying the Sharing settings, if you still face an issue where the Test connection fails and results in a 403 error, you might have to disable the Resource Booking Permissions in Google admin->Apps->G Suite->Calendar->General Settings->Resources.

  1. Modify the Resource booking permissions setting and set it to disabled.
How to allow third party WordPress plugins to communicate with your Google Calendar
Resources Setting
  1.  
  2. Set the Secondary Calendar Sharing Options in General Settings to ‘Share all information, and allow managing of calendars’
Secondary Calendar Settings
Secondary Calendar Settings

The above changes will help setup the connections as needed. This can be confirmed by running a Test Connection and ensuring the results were successful.

So, if you face an issue where the permissions for Service Account Email Address keep defaulting, it becomes necessary to check the setup of the permissions.

This is applicable for any plugin/app that might be trying to sync data with your google calendar.

The above steps will help ensure that our user account has all the permissions setup correctly thereby allowing us to grant other users permissions.

In case if you have faced similar issues and know of ways to fix it apart from the ones mentioned above, do let me know in the comments below!

Browse more in: Google Calendar, WooCommerce Booking & Appointment

Share It:

Subscribe
Notify of
0 Comments
Newest
Oldest
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x