To set the location for your products, the plugin uses Google Maps services. So the first step is to insert the“Google Maps API Key”.
After selecting the project, in the next step, you will obtain the key required by the plugin.
Copy and paste the key into YITH > Booking > Settings > General settings > “Google Maps API Key”
Now access the product, type in the name of the location you wish to select and you are done.
You can set 2 different API Keys for:
- Google Maps API Key
- Google Maps Geocode API Key
To set them correctly, you should create 2 different API Keys in Google Console:
1. The Google Maps API Key can be restricted through HTTP referrers.
2. The Google Maps Geocode API Key can be restricted through IP addresses.
How to enable Geocode and Places libraries in your Project
To have everything work correctly, you need to enable Geocode and Places libraries in your Google project.
open your project
go to Library
- Now search for Geocode API and enable it.
To enable the Places API library, just follow the same procedure described above.