*** Gellum Delivery Calculator for WooCommerce Changelog ***

== Changelog ==

= 1.1.3 (2026-02-17) =
* Confirmed compatibility with WordPress 6.9.1.
* Confirmed compatibility with WooCommerce 10.5.2.
* Minor CSS/JS fixes for the latest version.

= 1.1.2 (2025-06-11) =
* Fix: Fixes a synchronization issue that prevented the shipping method from updating correctly at checkout.
* Fix: The Plus Code customer address is now always updated. (In or out of coverage area).
* Improvement: We implemented a new system to generate the static map with API Key restricted by http.
* Improvement: Improved security in Ajax processes.

= 1.1.1 (2025-06-11) =
* Minor bug fixes.

= 1.1.0 (2025-06-10) =
* Improvement: Selectable calculation method for the distance between the business and the customer. The Google Direction API is now used to calculate the correct vehicle route, taking into account streets, roads, and more.
* Update: New dynamic map that matches the calculation method selected by the administrator.
* Improvement: The static map of the delivery location is now automatically displayed in the customer's email.
* Improvement: Added a setting to allow admin to choose between Kilometers (km) and Miles (mi) for distance calculattion and rate configuration.
* Improvement: The delivery cost summary on the checkout page now optionally displays the calculated distance and the selected unit (e.g., 7.5 mi).
* Update: The backend logic for cost calculation was refactored to support both distance units.
* CSS updates: Minor changes in colors.
* Minor Fixes have been made.

= 1.0.7 (2025-05-30) =
* Bug fix that prevented "View on Google Map" from being displayed within order management.
* Update: Only Address 1 si readonly when Gellum Delivery is selected.

= 1.0.6 (2025-05-30) =
* Updated gdc prefixes to gellumdcw.
* Updated [gdc_map] shortcode to [gellumdcw_map].
* Created gellum-delivery-calculator.pot within language.

= 1.0.5 (2025-05-26) =
* Feat: Add internal order note with customer GPS Google Maps link.
* Fix: Ensure geocoded address fields always update, overwriting previous values.
* Fix: Improve state/province dropdown selection by matching option text.
* Feat: Make Address 1 & City fields `readonly` when Gellum Delivery is selected.

= 1.0.4 (2025-05-26) =
* Updated server-side PHP execution to JS for compatibility with HTTP Refer APIKey restrictions
* Improved security.
* Minor bug fixes.

= 1.0.3 (2025-05-26) =
* CSS and icon changes.
* Minor bug fixes.
* Improved security.

= 1.0.2 (2025-05-24) =
* Minor bug fixes.
* CSS updates.
* Descriptive text fixes.
* Update store icon.

= 1.0.1 (2025-05-23) =
* **Robust Map Initialization:** Improved JavaScript stability by ensuring latitude/longitude values are correctly parsed as numbers before being used by the Google Maps API, resolving potential map load failures.
* **Advanced Marker Implementation:** Updated map markers to use `google.maps.marker.AdvancedMarkerElement` when a Google Maps Map ID is provided, addressing deprecation warnings for `google.maps.Marker`.
* **Conditional Marker Logic:** Implemented a fallback to the standard `google.maps.Marker` if no Map ID is configured, ensuring the map remains functional even without advanced marker features. This includes conditionally loading the `marker` library.
* **Configurable Map ID:** Added a new setting in the WooCommerce shipping method configuration for store owners to input their Google Maps Map ID, allowing for the use of cloud-based map styles and vector maps.
* **GeoJSON Layer Click-Through:** Resolved an issue where the GeoJSON delivery area overlay would intercept map clicks, preventing users from selecting a delivery location within the drawn area. Clicks now pass through to the map correctly.
* **GeoJSON Styling Option:** Modified the GeoJSON delivery area to display as an outline only (no fill) for clearer map interaction, by adjusting `fillOpacity`.
* **Optimized Google Maps API Script Loading:** Implemented `async` and `defer` attributes for the Google Maps API script tag via a WordPress filter, addressing performance warnings and improving page load behavior.
* **Enhanced Debugging & Error Handling:** Added more console log messages and error handling in JavaScript for map initialization and GeoJSON processing to aid in troubleshooting.

= 1.0.0 (2025-05-20) =
* Initial release and subsequent bug fixes.
* Switched primary AJAX action to handle both reverse geocoding and Gellum cost calculation in a single call.
* Refined session handling and cart total recalculation logic, leveraging WooCommerce checkout fragments and triggers.
* Adjusted `is_available` logic to be more permissive, relying primarily on `calculate_shipping` (based on session data) to add/remove the rate dynamically.
* Improved GeoJSON handling and validation in both PHP and JavaScript.
* Enhanced logging for easier debugging.
* Improved handling of Google Maps API loading and error messages.
* Added core features: Distance calculation, GeoJSON area, rate configuration, interactive map.
* Included `[gdc_map]` shortcode.
* Added server-side checkout validation.