WPRuby Blog

Explore our blog for expert tips on WordPress plugins, development, and eCommerce solutions to grow your online business.

Loqate Address Validation for WooCommerce

Blog Image

WooCommerce will take payment for an address that only looks complete. A missing house number, a postcode from another country, or a street a carrier cannot find will still pass if the required fields are filled in. The customer leaves. Fulfilment finds the problem when the label fails.

Loqate address validation for WooCommerce closes that gap before the order is placed. Loqate Address Verify checks the shipping address against postal data. Address Guard Pro then warns the customer, offers a corrected address, or blocks checkout, depending on the result and your rules.

This article explains what Loqate validates, how Capture and Verify differ, and how to connect both at checkout with Address Guard Pro. For the broader validation flow, see How to Validate Addresses Before WooCommerce Checkout.

What Loqate address validation does at checkout

Loqate (part of GBG) is a postal-grade address network. It is not a WooCommerce field check. Required country, street, city, and postcode only prove the form is not empty. Loqate proves whether those values hold together as a real address.

At place-order, Address Verify compares the typed (or autocompleted) address with postal records. Typical outcomes:

  • Verified. The street, city, postcode, and country match a known location. Loqate may also return a standardized version for the label.
  • Corrected. The address is close, but formatting, postcode, or city should change. The customer can accept the suggestion.
  • Unverified. Loqate cannot confirm the building. Rural properties, new builds, and some apartment formats land here even when a carrier can deliver.
  • Invalid. There is no usable match. A fake street, a postcode from another country, or a combination that does not exist usually lands here.

Your store then decides what the customer sees: a warning, a suggested address, a block, or a quiet pass with a review flag for fulfilment.

Loqate does not replace shipping zones, tax, or carrier rates. Those still run on country, state, and postcode. Validation answers a different question: can we ship to what they entered?

Why WooCommerce stores use Loqate

Stores pick Loqate when they already buy GBG data, ship across many countries, or need structured capture that can drill from building to unit. The same API key can power both layers if Address Capture and Address Verify are enabled on the account.

What that buys you at checkout:

  • Postal verification instead of “fields are filled in.”
  • Standardized addresses that match how carriers expect street, city, and postcode to look.
  • A suggested correction the customer can accept without retyping the form.
  • Nested capture for buildings that contain multiple units, so the customer picks the building, then the apartment.
  • A record on the order of original versus normalized address, so fulfilment is not reconstructing the checkout from email.

That last point matters as much as the checkout message. A failed label is cheaper to fix when the order already shows that Loqate could not verify the street, or that the customer declined the suggested postcode.

The cost of skipping this is the usual chain: the label cannot be created, support emails the customer, delivery dates slip, and express orders miss the cutoff. One bad address might take ten minutes. Across a week of orders, those exceptions become a regular drain.

Loqate Address Capture vs Address Verify

Stores often treat Loqate as a single “address check.” It is two products, and they do different jobs.

ProductRole at checkoutWhat the customer sees
Loqate Address CaptureAutocompleteA suggestion dropdown on address line 1. Selecting one fills street, city, state, postcode, and country. Nested results can expand a building into units.
Loqate Address VerifyValidationA check before the order is placed. The store can warn, offer a corrected address, allow checkout, or block it.

Capture helps the customer enter a complete address. Verify checks whether that address is real. If you only turn on Capture, a customer can ignore the dropdown and type a fake street. If you only turn on Verify, more addresses fail because they were typed poorly in the first place.

The comparison of validation vs autocomplete is worth reading if you are still deciding which layer to enable first. For Capture setup in isolation, see the address autocomplete guide.

Most stores that print shipping labels need both. A practical Loqate pair is:

  1. Capture on the shipping address, so city and postcode fill together.
  2. Verify on place-order, so unverified or invalid addresses are caught while the customer is still on the page.
  3. Local rules for missing house numbers, PO boxes, and postcode/country mismatches your warehouse will not ship.

You can mix vendors. Mapbox or Google Places for suggestions plus Loqate Address Verify for the check is a normal production setup. Address Guard Pro treats autocomplete and validation as separate providers.

What WooCommerce still will not do

Native checkout can:

  • Require country, street, city, state, and postcode
  • Offer shipping methods from those fields
  • Copy billing into shipping

Native checkout cannot:

  • Suggest real addresses as the customer types
  • Confirm that the building exists
  • Standardize formatting for label purchase
  • Show a corrected address and let the customer accept it
  • Keep original versus Loqate-normalized data on the order

Browser autofill is also not Loqate. Autofill replays an address the customer saved earlier. It will fill a stale or incomplete address just as readily as a good one.

What happens when Loqate verifies a WooCommerce address

A working Loqate address validation flow has four steps.

  1. The customer enters a shipping address. They type it, pick a Capture suggestion, or reuse a saved address.
  2. Address Verify runs before payment. Street, city, state, postcode, and country are sent to Loqate. The response includes a match (when there is one), a standardized address, and a verification signal.
  3. The plugin maps that signal into a checkout action. Verified can pass. Corrected can show “Did you mean …?” Unverified can warn. Invalid can block. Provider errors can be marked for review so an API outage does not freeze checkout.
  4. The result is stored on the WooCommerce order. Fulfilment can see the original address, the normalized address, the status, and which rules matched.

Keep this on the shipping address. That is the address on the label. Billing can stay quieter unless invoices or tax IDs depend on a precise street. A customer may bill to a registered office and ship to a street. Those forms should stay independent.

Warn, block, allow, or mark for review

Loqate returns data. Your store decides the policy.

ActionWhat the customer seesUse it when
WarnA checkout message. They can continue.Unverified addresses, first-week validation, or provider uncertainty
BlockA checkout error. They must change the address.Invalid matches, missing house numbers, unusable PO boxes
AllowNothing extra, or a quiet passVerified addresses, or cases you have chosen not to interrupt
Mark for reviewThe order can be placed. Fulfilment gets a flag.API errors, heavy normalization, or destinations a human should check before buying a label

Do not launch on Block checkout as the store-wide default. Rural properties and new buildings are often unverified in postal data even when a carrier can deliver there. A customer who cannot place the order does not wait around to argue with the validator.

A practical split:

  • Warn on unverified Loqate results.
  • Offer the suggested address when Verify returns a standardized version that differs from what they typed.
  • Block missing house numbers and invalid postcode/country combinations once those rules are tested.
  • Review when Loqate is unreachable, so a credit or network failure does not stop paid orders.

How to write the warning itself is covered in How to Warn Customers About Invalid WooCommerce Addresses.

Set up Loqate address validation with Address Guard Pro

Address Guard Pro connects Loqate Address Capture and Loqate Address Verify to Checkout Blocks and classic [woocommerce_checkout]. You use your own Loqate API key. The plugin does not bundle provider usage, so you keep control of GBG billing.

Step 1: Enable Capture and Verify on the Loqate key

In your Loqate account, create or reuse an API key and enable the services you will use:

  • Address Capture if you want autocomplete
  • Address Verify if you want checkout validation

A key that is only enabled for Capture will fail the validation test. A key that is only enabled for Verify will fail the autocomplete test. If the admin tester reports that the key is not authorized for the selected service, turn that product on for the key, then test again.

Watch for IP or URL restrictions on the key. Address Guard Pro calls Loqate from your server, so the key must allow your site’s outbound IP. Exhausted credits and rate limits surface as provider errors, not as a generic WooCommerce checkout failure.

Step 2: Connect Loqate in WooCommerce

Go to WooCommerce → Address Guard → Providers.

  1. Choose Loqate Address Capture as the autocomplete provider if you want suggestions.
  2. Choose Loqate Address Verify as the validation provider.
  3. Enter the Loqate API key.
  4. Click Test autocomplete provider and Test validation provider.

Do not enable checkout validation until both tests you intend to use succeed. A failed test usually means a missing key, a service that is not enabled on the account, a restriction on the key, or exhausted credits.

You can mix providers on this same screen. Google Places or Mapbox for autocomplete plus Loqate Address Verify for validation is valid. Capture plus Verify on one Loqate key is the simplest Loqate-only setup.

Limit autocomplete countries to the destinations you actually ship to. If the customer has already chosen a checkout country, that country should win. Otherwise a suggestion from another market fills the form, and shipping methods and tax look wrong.

Step 3: Enable validation on checkout

Go to WooCommerce → Address Guard → Checkout.

Recommended starting settings for a store that ships physical products:

  • Enable checkout validation: On
  • Enable address autocomplete: On, applied to the shipping address
  • Validate shipping address: On
  • Validate billing address: Off
  • Checkout action: Warn customer
  • Allow customer to continue with an unverified address: On

Start with warnings. Blocking on day one catches real problems and also edge cases you have not seen yet. Leave unverified on allow-to-continue until you have reviewed a week of real orders. Unverified is not the same as undeliverable.

Turn billing off unless you have a reason. Card networks tolerate a messy billing street better than carriers tolerate a messy shipping street.

Step 4: Put Loqate results on the right rules

Go to WooCommerce → Address Guard → Rules.

Loqate Verify tells you whether the address matched postal data. Rules encode what your warehouse will not ship. For most stores, start here:

RuleWhen it matchesRecommended action
Warn on unverified addressLoqate cannot fully verify the buildingWarn customer
Block missing house numberStreet line has no building numberBlock checkout after you have tested it
Block invalid postcode/country combinationPostcode format does not match the countryBlock checkout after you have tested it
Review provider errors manuallyThe Loqate API failedMark for review

Add PO box and parcel locker rules only if your couriers cannot serve those destinations. Keep them on shipping. That workflow is covered in How to Block PO Boxes and Parcel Lockers in WooCommerce.

Rules run by priority. Lower numbers run first. Put blocking rules ahead of warnings so a missing house number is not hidden under a softer “please review” message.

Step 5: Write messages that include the Loqate suggestion

Go to WooCommerce → Address Guard → Messages.

When Verify returns a standardized address, the highest-converting prompt is the suggestion, not a generic error.

Good:

This shipping address could not be verified. Please check the house number, postcode, and country, or accept the suggested address below.

Good:

Did you mean: {suggested_address}?

Less helpful:

Address validation failed.

Use placeholders so one template works for shipping and billing: {address_type}{suggested_address}{postcode}{country}. Name the field that is wrong. A message that sounds like a declined payment will raise abandonment even when the customer could have continued.

Step 6: Test Capture and Verify on the live checkout type

Go to WooCommerce → Address Guard → Tester, then place a test order on Checkout Blocks or classic checkout, whichever your store actually uses.

At minimum, confirm:

  • A known-good address places with no warning
  • Capture suggestions appear on address line 1, including a nested building-then-unit example if you ship to apartments
  • Selecting a suggestion fills city, postcode, and country
  • The same address with the house number removed matches the house-number rule
  • A postcode from another country is flagged
  • An unverified rural or new-build example warns and still allows Place order
  • A corrected address appears when Loqate has one, and accepting it updates the form
  • A disabled Capture or Verify product on the API key fails the matching admin test
  • Billing is left alone if you disabled billing validation
  • The same flow works on a phone-width screen
  • The WooCommerce order stores the original address, the normalized address, the Loqate status, and the checkout action

If the tester passes and checkout does not show the message, you are usually on the other checkout type (Blocks vs classic) or a theme is hiding notices. Fix that before you send paid traffic.

When Loqate is the right validation provider

Choose Loqate Address Verify when:

  • You already have a Loqate or GBG account and want checkout to use the same data
  • You ship to many countries and want postal-grade verification from one vendor
  • You need Capture’s nested results for buildings with units
  • You want a corrected, standardized address the customer can accept
  • Fulfilment needs original versus normalized data on the order

Choose a different validation provider (or mix) when:

  • Your catalogue is mostly US and you already pay for Smarty
  • You want Google Places suggestions and Google Address Validation on the same Maps billing account
  • You only need local rules (PO boxes, missing house numbers) and are not ready to add an API

Address Guard Pro does not force a single vendor. Connect the network you already pay for, or the one that covers your shipping countries best.

After the customer continues

Validation only helps fulfilment if someone can see it on the order.

Address Guard Pro stores the original address, the Loqate-normalized address, the validation status, matched rules, and the checkout action. Open the order and check the Address Guard panel before you buy a label when:

  • The status is unverified or invalid
  • The customer was warned and continued
  • A suggested address was shown and declined
  • A Loqate API error occurred

If the same Loqate warning keeps leading to return-to-sender parcels, change that rule from warn to block. If it never predicts a failed label, soften or remove it.

A Loqate setup that works for most WooCommerce stores

If you want a default that protects checkout without surprising customers:

  1. Enable Address Capture and Address Verify on your Loqate API key.
  2. Connect both in WooCommerce → Address Guard → Providers and run the tests.
  3. Turn autocomplete and validation on for the shipping address only.
  4. Set the checkout action to Warn customer.
  5. Allow unverified addresses until you have reviewed a week of orders.
  6. After testing, block missing house numbers and invalid postcode/country pairs.
  7. Keep a suggested-address message so customers can accept Loqate’s correction in one click.
  8. Promote the warnings that consistently predict failed deliveries to blocks.

The goal is not to reject every unusual address. It is to catch the mistakes that would otherwise reach fulfilment, while the customer can still fix them.

Common questions

Is Loqate Address Capture the same as Loqate address validation?
No. Capture is autocomplete. Verify is validation. Capture fills the form. Verify checks the form before payment. Use both if you print shipping labels.

Do I need a separate API key for Capture and Verify?
Usually no. One merchant-owned Loqate key can power both, as long as both products are enabled on that key. Address Guard Pro stores a single Loqate API key.

Does picking a Capture suggestion mean the address is validated?
No. A suggestion is a structured capture from search data. Address Verify is a separate check against postal records. Run both if you need deliverability, not only a filled form.

Should I block checkout when Loqate returns unverified?
Not on day one. Unverified often means rural, new-build, or an unusual unit format. Warn first. Block invalid matches and local rules you have tested, such as missing house numbers.

Does this work with Checkout Blocks?
Yes. Address Guard Pro supports Checkout Blocks and classic [woocommerce_checkout]. Test the type your store actually runs, including a phone-width viewport so suggestions and notices are not clipped.

Can I use Loqate Verify without Capture?
Yes. Expect more warnings, because more addresses arrive as free-typed text. Capture is the cheaper way to reduce those warnings.

Can I use Loqate with Google or Mapbox?
Yes. Autocomplete and validation are separate choices. Mapbox or Google Places for suggestions plus Loqate Address Verify for the check is a normal mix.

Will Loqate replace shipping zones?
No. Shipping zones decide which methods to offer. Loqate decides whether the address itself is complete and verifiable.

What if the Loqate API is down?
Set provider errors to Mark for review so checkout can continue and fulfilment gets a flag. Do not let an API outage become a payment failure.

Check the address before you take payment

WooCommerce will accept any address that fills the required fields. Carriers will not.

Loqate address validation for WooCommerce is how you check the shipping address against postal data while the customer is still on checkout. Capture helps them enter it. Verify confirms it. Rules encode what you will not ship. The order keeps the result so fulfilment is not guessing.

Learn more about Address Guard Pro, or start with the setup guide: Get Started.

Leave a Reply

Your email address will not be published. Required fields are marked *