Skip to content

Commit 69709dd

Browse files
committed
update to the latest swiftlookup.js
1 parent 7bf199f commit 69709dd

File tree

9 files changed

+76
-78
lines changed

9 files changed

+76
-78
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
![Swiftcomplete Address Autocomplete](./assets/swiftcomplete_hero.jpg)
1+
![SwiftLookup](./assets/screenshot-1.jpg)
22

33

4-
# Swiftcomplete Address Autocomplete Plugin for WooCommerce
5-
The Swiftcomplete Address Autocomplete Plugin enhances WooCommerce checkout by providing fast and accurate address and what3words autocomplete, improving user experience and reducing delivery errors.
4+
# SwiftLookup for WooCommerce
5+
The SwiftLookup Plugin enhances WooCommerce checkout by providing fast and accurate address and what3words autocomplete, improving user experience and reducing delivery errors.
66

77
## What is Swiftcomplete?
88
Swiftcomplete is a software that allows you to look up and validate addresses, postcodes and coordinates. It is designed to be integrated into your address capture flow, for example on e-commerce checkout pages. Swiftcomplete is uniquely designed to return a valid address as fast as possible.
@@ -44,18 +44,18 @@ Improves quality of address data
4444

4545
- what3words entry: included as standard
4646

47-
![Swiftcomplete Address Autocomplete flows](./assets/swiftcomplete_flows.png)
47+
![SwiftLookup flows](./assets/screenshot-2.png)
4848

4949

5050
## More about what3words
5151

5252
Find our full developer documentation here:
53-
[https://swiftcomplete.notion.site/Swiftcomplete-WooCommerce-address-autocomplete](https://swiftcomplete.notion.site/Swiftcomplete-WooCommerce-address-autocomplete-1a466db17f3b8018bc4ce65f85f6c852)
53+
[https://swiftcomplete.notion.site/Swiftcomplete-WooCommerce-plugin-for-SwiftLookup](https://swiftcomplete.notion.site/Swiftcomplete-WooCommerce-plugin-for-SwiftLookup-1a466db17f3b8018bc4ce65f85f6c852)
5454

5555
You can learn more about our privacy policy here:
5656
[https://www.swiftcomplete.com/privacy/](https://www.swiftcomplete.com/privacy/)
5757

5858

5959
## Get in touch with us
6060

61-
Have any questions? Want to learn more about how the Swiftcomplete Address Autocomplete plugin works? Get in touch with us at [support@swiftcomplete.com](mailto:support@swiftcomplete.com).
61+
Have any questions? Want to learn more about how the SwiftLookup plugin works? Get in touch with us at [support@swiftcomplete.com](mailto:support@swiftcomplete.com).

README.txt

Lines changed: 22 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
=== Swiftcomplete for WooCommerce ===
1+
=== SwiftLookup for WooCommerce ===
22
Contributors: Swiftcomplete
3-
Tags: Swiftcomplete, address validator, what3words address, searchbox, search, address, validation, autosuggest, w3w
3+
Tags: Swiftcomplete, address validator, what3words address, searchbox, search, address, validation, autosuggest, w3w, capture, address lookup, autocomplete, verification, address collection, address finder, cleansing, address standardising
44
Requires at least: 4.7
55
Tested up to: 6.4
6-
Stable tag: 2.0.0
6+
Stable tag: 1.0.8
77
Requires PHP: 7.0
88
License: GPLv2 or later
9-
License URI: h bbbbbovvbv v b bbbbbbbb bbbbbbbb bbb nnnnmmnnnmnnmmnmn yVwFf_CANlU79F-1a-IqUeMSwTU7MRlN/view
9+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
1010

1111
Swiftcomplete is designed to be integrated into your address capture flow, for example on e-commerce checkout pages.
1212

@@ -15,70 +15,57 @@ Swiftcomplete is designed to be integrated into your address capture flow, for e
1515
* Fast: Operates with low latency
1616
* Comprehensive: Combines high quality geospatial databases and multi*residence addresses for best possible address matching.
1717
* Easy to use: Simple, effective user interface
18-
* Cost-effective: 3p per address flat rate (Bespoke enterprise solutions available)
18+
* Cost-effective: Credit packs from £10 (3p per address) (Bespoke enterprise solutions available)
1919
* what3words entry: included as standard
2020

2121
== Installation ==
2222

2323
= WordPress Installation (recommended) =
2424

25-
You can install Swiftcomplete Address Autocomplete Plugin plugin through the WordPress plugins page in your WordPress admin panel.
25+
You can install SwiftLookup plugin through the WordPress plugins page in your WordPress admin panel.
2626

2727
1. Navigate to the _Plugins > Add New_ page
28-
2. Search for "Swiftcomplete"
28+
2. Search for "SwiftLookup"
2929
3. Click the _Install Now_ button.
3030
4. Once installed, you can activate the plugin on the _Plugins_ page.
3131

3232
= Manual Installation =
3333

34-
You can download the Swiftcomplete Address Autocomplete plugin from the [WordPress Plugins site](https://wordpress.org/plugins/swiftcomplete-address-autocomplete/#installation).
34+
You can download the SwiftLookup plugin from the [WordPress Plugins site](https://wordpress.org/plugins/swiftlookup/#installation).
3535

36-
1. Download the Swiftcomplete Address Autocomplete plugin from the WordPress Plugins site
36+
1. Download the SwiftLookup plugin from the WordPress Plugins site
3737
2. Once you have downloaded the zipped plugin, you can upload it to your WordPress installation by navigating to _Plugins > Add New_, click the _Upload Plugin_ button
3838
3. Select the zipped plugin file and click _Install Now_
3939
4. Once installed, you can activate the plugin on the _Plugins_ page.
4040

41-
4241
= More about what3words =
4342

4443
Find our full developer documentation here:
45-
[https://swiftcomplete.notion.site/Swiftcomplete-WooCommerce-address-autocomplete](https://swiftcomplete.notion.site/Swiftcomplete-WooCommerce-address-autocomplete-1a466db17f3b8018bc4ce65f85f6c852)
44+
[https://swiftcomplete.notion.site/Swiftcomplete-WooCommerce-plugin-for-SwiftLookup](https://swiftcomplete.notion.site/Swiftcomplete-WooCommerce-plugin-for-SwiftLookup-1a466db17f3b8018bc4ce65f85f6c852)
4645

4746
You can learn more about our privacy policy here:
4847
[https://www.swiftcomplete.com/privacy/](https://www.swiftcomplete.com/privacy/)
4948

5049
= Get in touch with us =
5150

52-
Have any questions? Want to learn more about how the Swiftcomplete Address Autocomplete plugin works? Get in touch with us at [support@swiftcomplete.com](mailto:support@swiftcomplete.com).
53-
54-
== Frequently Asked Questions ==
55-
56-
= A question that someone might have =
57-
58-
An answer to that question.
59-
60-
= What about foo bar? =
61-
62-
Answer to foo bar dilemma.
51+
Have any questions? Want to learn more about how the SwiftLookup plugin works? Get in touch with us at [support@swiftcomplete.com](mailto:support@swiftcomplete.com).
6352

6453
== Screenshots ==
6554

66-
1. This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Screenshots are stored in the /assets directory.
67-
2. This is the second screen shot
55+
1. SwiftLookup
56+
2. SwiftLookup Address flow
57+
3. SwiftLookup - Input Flow - Postcode
58+
4. SwiftLookup - Input Flow - Street Address
59+
5. SwiftLookup - Input Flow - what3words address
6860

6961
== Changelog ==
7062

71-
= 1.0 =
72-
* A change since the previous version.
73-
* Another change.
74-
75-
= 0.5 =
76-
* List versions from most recent at top to oldest at bottom.
63+
= 1.0.8 =
64+
* Update the latest swiftlookup.js
7765

78-
== Upgrade Notice ==
66+
= 1.0.7 =
67+
* Added check for address coverage when showing or hiding fields
7968

80-
= 1.0 =
81-
Upgrade notices describe the reason a user should upgrade. No more than 300 characters.
69+
= 1.0.6 =
70+
* Remove invalid field validation on successful address population
8271

83-
= 0.5 =
84-
This version fixes a security related bug. Upgrade immediately.

addressfinder.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
function launchAddressLookup(type, key, searchFor, hideFields, biasTowards, placeholder, returnStateCounty) {
22
function initialiseSwiftcomplete() {
3-
swiftcompletew3w.runWhenReady(function () {
3+
swiftcomplete.runWhenReady(function () {
44
var autocompleteField = document.getElementById('swiftcomplete_' + type + '_address_autocomplete');
55

66
if (autocompleteField) {
@@ -30,7 +30,7 @@ function launchAddressLookup(type, key, searchFor, hideFields, biasTowards, plac
3030
if (searchFor && searchFor.indexOf('what3words') != -1)
3131
addressFields.push({ container: document.getElementById('swiftcomplete_what3words_field'), field: document.getElementById("swiftcomplete_what3words"), format: "what3words" });
3232

33-
swiftcompletew3w.controls[type] = new swiftcompletew3w.PlaceAutoComplete({
33+
swiftcomplete.controls[type] = new swiftcomplete.SwiftLookup({
3434
key,
3535
searchFor: searchFor,
3636
field: autocompleteField,
@@ -44,9 +44,9 @@ function launchAddressLookup(type, key, searchFor, hideFields, biasTowards, plac
4444
}))
4545
});
4646

47-
swiftcompletew3w.controls[type].biasTowards(biasTowards);
47+
swiftcomplete.controls[type].biasTowards(biasTowards);
4848

49-
autocompleteField.addEventListener('swiftcomplete:place:selected', function (e) {
49+
autocompleteField.addEventListener('swiftcomplete:swiftlookup:selected', function (e) {
5050
for (var i = 0; i < addressFields.length; i++) {
5151
addressFields[i].container.style.display = 'block';
5252

@@ -57,7 +57,7 @@ function launchAddressLookup(type, key, searchFor, hideFields, biasTowards, plac
5757
}
5858
}, false);
5959

60-
autocompleteField.addEventListener('swiftcomplete:place:manualentry', function (e) {
60+
autocompleteField.addEventListener('swiftcomplete:swiftlookup:manualentry', function (e) {
6161
for (var i = 0; i < addressFields.length; i++) {
6262
document.getElementById('swiftcomplete_' + type + '_address_autocomplete_field').style.display = 'none';
6363
addressFields[i].container.style.display = 'block';
@@ -85,7 +85,7 @@ function launchAddressLookup(type, key, searchFor, hideFields, biasTowards, plac
8585

8686
function launchAdminAddressLookup(type, key, searchFor, hideFields, biasTowards, placeholder, returnStateCounty) {
8787
function initialiseSwiftcomplete() {
88-
swiftcompletew3w.runWhenReady(function () {
88+
swiftcomplete.runWhenReady(function () {
8989
var autocompleteField = document.getElementById('swiftcomplete_' + type + '_address_autocomplete');
9090

9191
if (autocompleteField) {
@@ -112,7 +112,7 @@ function launchAdminAddressLookup(type, key, searchFor, hideFields, biasTowards,
112112

113113
addressFields.push({ field: document.getElementById('_' + type + '_postcode'), format: "POSTCODE" });
114114

115-
swiftcompletew3w.controls[type] = new swiftcompletew3w.PlaceAutoComplete({
115+
swiftcomplete.controls[type] = new swiftcomplete.SwiftLookup({
116116
key,
117117
searchFor: searchFor,
118118
field: autocompleteField,
@@ -126,15 +126,15 @@ function launchAdminAddressLookup(type, key, searchFor, hideFields, biasTowards,
126126
}))
127127
});
128128

129-
swiftcompletew3w.controls[type].biasTowards(biasTowards);
129+
swiftcomplete.controls[type].biasTowards(biasTowards);
130130

131131
jQuery(function ($) {
132132

133-
swiftcompletew3w.controls[type].setCountries($('select[name=_' + type + '_country]').val());
133+
swiftcomplete.controls[type].setCountries($('select[name=_' + type + '_country]').val());
134134

135135
$(document.body).on('change', 'select[name=_' + type + '_country]', function () {
136136
console.log($('select[name=_' + type + '_country]').val());
137-
swiftcompletew3w.controls[type].setCountries($('select[name=_' + type + '_country]').val().toLowerCase());
137+
swiftcomplete.controls[type].setCountries($('select[name=_' + type + '_country]').val().toLowerCase());
138138
});
139139
});
140140
}
@@ -194,7 +194,7 @@ function initialiseSwiftcompleteBlocks(type, key, searchFor, hideFields, biasTow
194194
if (searchFor && searchFor.indexOf('what3words') != -1)
195195
addressFields.push({ field: document.getElementById("swiftcomplete_what3words"), format: "what3words" });
196196

197-
swiftcompletew3w.controls[type] = new swiftcompletew3w.PlaceAutoComplete({
197+
swiftcomplete.controls[type] = new swiftcomplete.SwiftLookup({
198198
key,
199199
searchFor: searchFor,
200200
field: autocompleteField,
@@ -209,17 +209,17 @@ function initialiseSwiftcompleteBlocks(type, key, searchFor, hideFields, biasTow
209209
}))
210210
});
211211

212-
swiftcompletew3w.controls[type].biasTowards(biasTowards);
212+
swiftcomplete.controls[type].biasTowards(biasTowards);
213213

214-
autocompleteField.addEventListener('swiftcomplete:place:selected', function (e) {
214+
autocompleteField.addEventListener('swiftcomplete:swiftlookup:selected', function (e) {
215215
if (document.getElementById(type + '-postcode'))
216216
document.getElementById(type + '-postcode').dispatchEvent(new Event('input', { bubbles: true }));
217217

218218
for (var i = 0; i < addressFields.length; i++)
219219
addressFields[i].container.style.display = 'block';
220220
}, false);
221221

222-
autocompleteField.addEventListener('swiftcomplete:place:manualentry', function (e) {
222+
autocompleteField.addEventListener('swiftcomplete:swiftlookup:manualentry', function (e) {
223223
for (var i = 0; i < addressFields.length; i++) {
224224
document.getElementById('swiftcomplete_' + type + '_address_autocomplete_field').style.display = 'none';
225225
addressFields[i].container.style.display = 'block';
@@ -240,11 +240,11 @@ function initialiseSwiftcompleteBlocks(type, key, searchFor, hideFields, biasTow
240240

241241
function showOrHideFields(type, addressFields, hideFields, countryCode, isBlocks) {
242242
if (countryCode)
243-
swiftcompletew3w.controls[type].setCountries(countryCode);
243+
swiftcomplete.controls[type].setCountries(countryCode);
244244

245245
var fieldsVisible = true;
246246

247-
if (hideFields && swiftcompletew3w.controls[type].hasAddressAutocompleteCoverageForCountry(countryCode)) {
247+
if (hideFields && swiftcomplete.controls[type].hasAddressAutocompleteCoverageForCountry(countryCode)) {
248248
var addressValuesExist = false;
249249

250250
try {
@@ -271,5 +271,5 @@ function showOrHideFields(type, addressFields, hideFields, countryCode, isBlocks
271271
}
272272

273273
if (document.getElementById('swiftcomplete_' + type + '_address_autocomplete_field'))
274-
document.getElementById('swiftcomplete_' + type + '_address_autocomplete_field').style.display = ((!countryCode || swiftcompletew3w.controls[type].hasAddressAutocompleteCoverageForCountry(countryCode)) ? 'block' : 'none');
274+
document.getElementById('swiftcomplete_' + type + '_address_autocomplete_field').style.display = ((!countryCode || swiftcomplete.controls[type].hasAddressAutocompleteCoverageForCountry(countryCode)) ? 'block' : 'none');
275275
}
File renamed without changes.
File renamed without changes.

assets/screenshot-3.gif

469 KB
Loading

assets/screenshot-4.gif

469 KB
Loading

assets/screenshot-5.gif

564 KB
Loading

0 commit comments

Comments
 (0)