Linux 软件免费装
Banner图

getAddress() Address Autocomplete

开发者 getaddress
更新时间 2026年10月16日 20:18
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

checkout address autocomplete australia new zealand denmark

下载

0.4.0

详情介绍:

Shoppers start typing their address, pick it from a list, and the rest of the address form fills in — street, unit or floor and door, suburb or town, state and postcode. Fewer typos, fewer failed deliveries. The plugin plugs into WooCommerce's own address autocomplete, so it works on the block checkout and the classic [woocommerce_checkout] checkout, on billing and shipping addresses, with WooCommerce's own look. Suggestions only appear for a country you have a token for. Other countries' address forms are left exactly as they are. What you need External services This plugin sends what a shopper types into the checkout address field, and the id of the address they pick, from the shopper's browser to getAddress(): A request is only made when the shopper has chosen a country you have entered a token for, and has typed at least three characters. It also sends what a shopper types into the Company field, for business name suggestions, to the same country's service: https://api.getaddress.io/companies (Australia) or https://api.getaddress.dk/companies (Denmark). New Zealand has none, so nothing is sent for it. Switch them off in the plugin's settings. Connect sends the merchant's browser to https://getaddress.io/connect (Australia), https://getaddress.dk/connect (Denmark) or https://getaddress.nz/connect (New Zealand) with the shop's domain, and the shop's server then exchanges the returned code at that country's /connect/token (https://api.getaddress.io, https://api.getaddress.dk or https://api.getaddress.nz) for the domain token and API key; Disconnect posts to its /connect/revoke. Nothing about shoppers is sent. If you save an API key for the order address check, your server also sends each new order's delivery address (street lines, town or suburb, state and postcode — no name, email or phone) a moment after the order is placed: Australian addresses to https://api.getaddress.io/validate, Danish ones to https://api.getaddress.dk/datavask/adresser, New Zealand ones to https://api.getaddress.nz/validate. Only for a country you saved a key for; without one, nothing is sent from your server. No name, email, phone number or order details are sent.

安装:

  1. Install and activate the plugin.
  2. Go to WooCommerce → Settings → getAddress() and press Connect getaddress.io (Australia), Connect getaddress.dk (Denmark), Connect getaddress.nz (New Zealand) — each country you sell to. Sign in or sign up there and allow your shop: that country's domain token and API key are filled in and address autocomplete is switched on.
  3. Or paste a domain token for each country (and, for the order check, that country's API key) yourself, then switch on Address autocomplete under WooCommerce → Settings → General. If you have more than one autocomplete provider, choose getAddress() as the preferred one.

屏幕截图:

  • A unit picked: the street on the address line, the unit on the apartment line, and the suburb, state and postcode filled in.
  • A building with units picked without one: the apartment line opens and asks for the unit number.
  • The same on the classic checkout.
  • "Refuse PO Boxes" on: a PO Box is turned away as the delivery address.
  • Orders, with the column from the order address check.
  • Settings: domain token, delivery rules and the order address check.

常见问题:

Does it cost anything?

The plugin is free. In every country, address and business name suggestions are free on every getAddress() plan and each address a shopper picks counts as one look-up.

Does it work with the block checkout?

Yes, and with the classic shortcode checkout.

Can I deliver to some states only?

Yes: WooCommerce → Settings → getAddress() → Delivery rules → "States delivered to". Choose the states and territories you deliver to; an Australian delivery address anywhere else is refused at checkout with a message naming them. Leave it empty to deliver everywhere.

Can I stop customers using a PO Box for delivery?

Yes: WooCommerce → Settings → getAddress() → Delivery rules → "Refuse PO Boxes". It covers Australia (PO Box, GPO Box, Locked Bag, parcel lockers), Denmark (Postboks, pakkeboks, parcel shops, Døgnpost) and New Zealand (PO Box, Private Bag, CMB, Counter Delivery, parcel lockers). A rural delivery number (RD 2) is a street address and is never refused. A PO Box stays fine as a billing address.

What does the order address check cost?

In Australia, one look-up on your getaddress.io plan for each order whose address is found; an address that isn't found costs nothing. In Denmark, one look-up on your getaddress.dk plan for each order DAR offers any address for — found, missing a floor and door, or a near miss — and nothing when nothing matches at all. In New Zealand, as in Australia: one look-up on your getaddress.nz plan for each order whose address is found. PO Boxes are recognised without a look-up.

What does the Danish order check look for?

It sends the address on one line to getaddress.dk's datavask (the address cleaning DAWA had), which reads it the way a person would, forgiving a typo or two. A clear match is Verified. When the house is right but it holds flats and no floor or door was given, the order is noted "Floor/door missing" with the house's address. Anything else — no such address, or several that fit equally — is noted "Not found".

Where do the business names come from?

In Australia, the Australian Business Register (ABN Lookup), refreshed weekly by getAddress(); in Denmark, CVR (Det Centrale Virksomhedsregister), active companies only. A business name never fills the address; the shopper still picks their address as usual. Turn the suggestions off under WooCommerce → Settings → getAddress() → Business names.

Is "Powered by getAddress()" shown to my customers?

Only if you tick "Credit" in the plugin's settings. It is off by default.

How fast is it?

Measured from Sydney against the live service: half of all address suggestions arrive within 28 ms and 95% within 445 ms; business names within 28 ms and 37 ms. The shopper's browser downloads about 6 KB of script (gzip) at checkout, with no Google Maps.

Is it accessible?

Yes. The suggestion lists follow the WAI-ARIA combobox pattern: they work with the keyboard alone (arrow keys, Enter, Escape), say how many suggestions there are to screen readers, and pass automated WCAG 2.2 AA checks (axe) on both checkouts and My Account. The unit prompt is announced as a status message and moves the cursor to the unit field. Address suggestions at checkout are drawn by WooCommerce's own accessible autocomplete.

Which countries?

Australia, Denmark and New Zealand.

更新日志:

0.4.0 0.3.0 0.2.0 0.1.3 0.1.2