=== GoMaps Address Autocomplete for Checkout ===
Contributors: gomaps
Tags: address autocomplete, checkout, gomaps, woocommerce, geolocation
Requires at least: 5.0
Tested up to: 6.8
Requires PHP: 7.2
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Donate link: https://paypal.me/choraha

GoMaps Address Autocomplete enhances checkout address fields using real-time, fast and privacy-respecting location suggestions. Built for WooCommerce.

== Description ==

This plugin adds GoMaps Autocomplete to your WooCommerce billing and shipping address fields. Powered by the GoMaps API, it improves checkout UX, boosts form accuracy, and reduces cart abandonment by auto-suggesting address input with geo-targeted precision.

– Fully compatible with WooCommerce checkout  
– Address Autocomplete for billing and shipping  
– IP-based geolocation country prefill  
– Supports select and text-based state fields  
– Limit suggestions to selected countries  
– Easy setup with your GoMaps API key

[Privacy Policy](https://tools.gomaps.pro/privacy-policy.html)

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/gomaps-address-autocomplete-for-checkout`
2. Activate through the "Plugins" screen in WordPress
3. Go to **GoMaps AutoComplete** in the admin menu
4. Paste your API key and configure settings

Get your API key from [https://gomaps.pro/developers](https://gomaps.pro/developers)

== Frequently Asked Questions ==

= Where do I get a GoMaps API key? =  
You can sign up and generate your API key at [https://gomaps.pro](https://gomaps.pro).

= Will this plugin work with custom checkout fields? =  
This plugin is designed for default WooCommerce billing and shipping fields. Compatibility with custom fields may vary.

= Does this plugin store any data? =  
No personal data is stored by the plugin itself. Address data is sent directly to the GoMaps API for suggestions and returned to the form.

= How do I restrict autocomplete to specific countries? =  
Go to the plugin settings in **GoMaps AutoComplete** and set the allowed countries.

= Is it compatible with WooCommerce Blocks checkout? =  
Currently, this plugin supports the classic (shortcode-based) WooCommerce checkout form. Support for the new Blocks-based checkout is under consideration.

== Screenshots ==

1. Autocomplete in action on the WooCommerce checkout page
2. Plugin settings page where you enter your GoMaps API key

== External services ==

This plugin utilizes the following external services:

**GoMaps API (https://maps.gomaps.pro)**  
* **Purpose:** Provides address autocomplete suggestions and place details for billing and shipping fields on your WooCommerce checkout.  
* **Data Sent:** When a user types into an address field, the typed query, the GoMaps API key, and the currently selected country (if configured to limit suggestions) are sent to the GoMaps API. When a suggested address is selected, the `place_id` for that address is sent to retrieve full address components.  
* **When Data is Sent:** Data is sent on each keystroke (with a debounce to reduce requests) in the address fields for autocomplete, and upon explicit selection of an address suggestion for detailed information.  
* **Terms of Service:** [https://gomaps.pro/terms](https://gomaps.pro/terms)  
* **Privacy Policy:** [https://tools.gomaps.pro/privacy-policy.html](https://tools.gomaps.pro/privacy-policy.html)

**IPAPI.co (https://ipapi.co)**  
* **Purpose:** To enhance the user experience by attempting to pre-fill the country selection on the checkout page based on the user's IP address. This helps streamline the address entry process.  
* **Data Sent:** The user's IP address.  
* **When Data is Sent:** A single request is made to this service when the WooCommerce checkout page first loads, only if the billing or shipping country fields are currently empty. This occurs once per checkout page load.  
* **Terms of Service:** [https://ipapi.co/terms](https://ipapi.co/terms)  
* **Privacy Policy:** [https://ipapi.co/privacy](https://ipapi.co/privacy)

== Changelog ==

= 1.0.0 =
* Initial release of GoMaps Autocomplete for WooCommerce checkout
* Refactored script and style enqueuing to use WordPress best practices (`wp_enqueue_script`, `wp_enqueue_style`, `wp_localize_script`, `wp_add_inline_style`)
* Included Select2 library files locally within the plugin
* Added comprehensive documentation for all external API calls in `readme.md`
* Ensured proper escaping for all echoed variables and options using WordPress escaping functions
* Added `translators:` comments for internationalization strings with placeholders
* Limited the number of tags in `readme.md` to meet WordPress.org requirements


== Screenshots ==

1. Address autocomplete in the checkout form.


== Upgrade Notice ==

= 1.0.0 =
Initial release. Includes address autocomplete integration for WooCommerce checkout with geolocation support.
