diff --git a/CHANGELOG.MD b/CHANGELOG.MD index b80854d..a3a7ed6 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,5 +1,9 @@ # Release Notes for Easy Address Field for Craft CMS +## 4.0.10 - 2024-08-07 +### Fixed +- Fields now respect wether geocoding is enabled or not ([#38](https://github.com/studioespresso/craft-easyaddressfield/issues/38)) + ## 4.0.9 - 2024-07-22 ### Fixed - Better error catching on Nomanatim errors ([#37](https://github.com/studioespresso/craft-easyaddressfield/issues/37)) diff --git a/composer.json b/composer.json index 8f73004..77b653f 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "studioespresso/craft-easyaddressfield", "description": "The only address field you need", "type": "craft-plugin", - "version": "4.0.9", + "version": "4.0.10", "keywords": [ "cms", "craftcms", diff --git a/src/services/FieldService.php b/src/services/FieldService.php index 46d3e42..7c1c38d 100644 --- a/src/services/FieldService.php +++ b/src/services/FieldService.php @@ -40,8 +40,7 @@ public function saveField(EasyAddressFieldField $field, ElementInterface $elemen $record->site = $element->siteId; $record->field = $field->id; } - - if(!ElementHelper::isDraftOrRevision($element)) { + if(!ElementHelper::isDraftOrRevision($element) && $field->geoCode) { $value = EasyAddressField::$plugin->geoLocation()->locate($value); }