Skip to content

obman/GeoApiWC-Plugin

Repository files navigation

GeoApiWC WooCommerce plugin

Contributors: (obman)
Tags: comments, spam
Requires at least: 6.0
Tested up to: 6.4
Stable tag: 1.2
License: MIT
License URI: https://opensource.org/licenses/MIT

Geocode API plugin for WooCommerce checkout forms

Description

Simplify your WooCommerce checkout with automatic location filling!

Save your customers time and frustration by automatically filling in their city and ZIP/postal code based on their address input. GeoApiWC plugin uses various high-performance geocoding APIs to ensure a smooth and speedy checkout experience.

Here's what GeoApiWC offers:

  • Automatic Location Filling: Reduce checkout time by automatically filling in city and ZIP/postal code during address entry.
  • Multiple Geocoding Options: Choose from 3 different API types to find the best fit for your needs.
  • Flexibility: Enable only ZIP/postal code to city name geocoding if preferred.
  • Performance Focused: Lightweight and asynchronous operations ensure minimal impact on your store's speed.
  • Modular Design: Easily extend and customize the plugin's functionality.
  • Stable APIs: Benefit from reliable and well-supported geocoding APIs.
  • Settings Panel: Fine-tune the plugin's behavior to perfectly suit your store.

Start saving your customers time and streamlining your checkout process today!

Installation

  1. Upload: GeoApiWC folder to the /wp-content/plugins/ directory
  2. Activate: Navigate to the 'Plugins' menu in your WordPress dashboard and activate GeoApiWC.
  3. You need to create account on https://geoapp.sample.si
  4. Create client project
  5. Get API credentials(Client ID and Client Secret) which you copy in plugin settings
  6. Generate license which you copy in plugin settings(License Key field)
  7. Activate which API microservice would you like to use for client project.

Settings

API Type

Choose the geocoding API that best suits your needs. Different APIs offer varying data and accuracy levels.
We recommend trying each one to find the optimal fit for your store.

Note: Currently are 3 types of geocode API available.

API Method: Address to ZIP and City name or ZIP to City name

Select the desired geocoding method:

  • Address to ZIP/Postcode and City: Check this box to automatically fill both city and ZIP/postal code based on the entered address.
  • ZIP/Postcode to City: Leave unchecked if you only want to fill the city based on the ZIP/postal code.

Note: Currently only API type 1 offers both options.

API Method: Get multiple address based on input address

This method will provide multiple address names with uncomplete address input.

Note: Currently works only with API type 3.

Fields IDs

Enter the IDs of your input fields.

By default, the plugin populates the IDs of the standard WooCommerce checkout form fields. If you're using custom checkout elements, enter their respective IDs here.

Here's how to find field IDs:

  1. Access your WordPress dashboard.
  2. Navigate to Appearance > Widgets.
  3. Add the "Custom HTML" widget to a sidebar.
  4. Paste the following code into the widget content area:
<script>
  console.log(document.getElementById('billing_postcode').id);
  console.log(document.getElementById('billing_city').id);
</script>
  1. Save the widget.
  2. Visit your checkout page and open your browser's developer console (usually by pressing F12).
  3. Look for the logged IDs in the console. These are the IDs you need to enter in the plugin settings.

Remember to remove the "Custom HTML" widget afterward.

License

License: MIT

To the extent possible under law, obman has waived all copyright and related or neighboring rights to this work.

About

Geocode API plugin for WooCommerce checkout forms

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published