WP Travel Pro v4.0.0 has come up with a new feature that allows you to integrate google calendar with WP Travel plugin. While integrating google calendar with WP Travel plugin, the trip which has been booked in the website will be created as an event with little information in the google calendar.
To integrate google calendar with WP Travel plugin, first of all, you have to create a project to set the client ID and client secret following the given link.
Note: Google console ID will be automatically created through the logged-in Gmail.
To create a project, please follow below given steps:
Step 1: login/register to google console following the link.
Step 2: Create a new project following the path Select a project > NEW PROJECT.
Step 3: Add the project name and click CREATE button.
Step 4: Select created project either through notification or Select a project dropdown.
Step 5: After selecting the created project you will be redirected to the Dashboard page.
Step 6: Under the dashboard menu go to API & Services > Credentials and click CONFIGURE CONSENT SCREEN.
Step 7: Then select External and click CREATE button.
Step 8: After clicking CREATE button you will redirect to an App information page where you have to fill information in the required fields which are listed below and save the changes by clicking the SAVE AND CONTINUE button.
- App name: In this field, you have to add the name of the App.
- User support email: In this field, you have to add the email address which has been used to create a project in the Google console.
- Email addresses (under Developer contact information): The email addresses added in this field are for Google to notify you about any changes to your project.
Step 9: Then again go to Credentials and Create Credentials.
Step 10: After clicking CREATE CREDENTIALS button, select OAuth client ID.
Step11: Select Web Application under Application type, add the name of the web client and add URIs under Authorized redirect URIs(the URLs of the settings page (backend) of your website where google calendar options are available. You can view the redirect URLs under Redirect URLs description in google calendar section too ) then click CREATE button.
Step12: A popup section will appear with a client ID and client secret.
Step13: Now add an email address that has been used to create the client ID as a test user by going to OAuth consent Screen > Test Users as shown in the screenshot below:
Note: If you don’t add the test user’s Gmail in the google console then an authorization error will occur during login through the Google Calendar section.
Step14: Finally go to Library, search Google calendar API and enable it.
After creating client ID and client secret along with enabling/adding other required options in google console, you have to add client ID and client secret as well as redirect URLs under Google calendar section in backend section of the website. As we have mentioned above that google calendar integration feature is only available in WP Travel Pro, to achieve the google calendar integration feature, you have to install and activate WP Travel Pro plugin. After activation of WP Travel Pro plugin go to Admin Panel > WP Travel > Settings > Misc. Options > Google Calendar, add the required values for the options which are listed below and save the settings.
1) Client Id: This option allows you to add client ID.
2) Client Secret: This option allows you to add client Secret.
3) Redirect URLs: This option allows you to add URLs of the settings page where google calendar option is available.
Now, login with the Gmail which has been used to create Client ID and Client Secret (in google console) clicking Login With Google button as shown in screenshot below:
Note: In case of already logged in and want to login with new ID and Client secret, please follow the given process logout > refresh page > add new ID & secret >save settings > refresh page > login with google otherwise authentication error may appear
If you are logging in with google for the first time during login process you have to checked View and edit events on all your calendars option as shown in screenshot below:
Now, it’s time to know how does this google calendar integration feature works.
When a customer book the trip on a certain date, it will be saved as an event for the selected date for booking of the trip in the Google calendar with little information. Google Calendar event display the information regarding trip title, customer name who booked the trip, booked date, time slot, location, phone number, email, trip price, trip pax, trip edit link etc. as shown in the screenshot below:
Note: Trip total won’t be displayed in the calendar event if you have booked a trip without payment i.e. Booking Only
For more details regarding how to integrate Google Calendar with WP Travel Plugin, please watch the Youtube video