One of my hosting clients runs a UK WooCommerce store that ships all over the world. One of their shipping providers (Royal Mail Click and Drop) has an API that struggles with non-English characters in shipping fields. But details with traditional ASCII characters work just fine.
Customers don’t know that. They type “José Núñez”, “Łódź” or “Straße”. Their phone turns the apostrophe in “O’Brien” into a curly one. The order goes through, the customer pays, and the problem only appears when someone prints the label. Then somebody in my client’s dispatch team has to spot the failed label, work out what the address should say and fix it by hand.
WordPress’s own remove_accents() gets part of the way there, but it leaves curly apostrophes, en dashes and non-breaking spaces alone, and it turns “Straße” into “Strase”. So I built a little Latin Address Checkout plugin for WooCommerce sites. It fixes the address at checkout, before the order is placed, and asks the customer to retype the parts it can’t fix.
What it does
For every billing & shipping name and address field, one of three things happens:
- Plain ASCII already: the value is left exactly as typed.
- Can be converted: the value is converted and the order is placed with it. “José Núñez, Łódź” is stored as “Jose Nunez, Lodz”.
- Can’t be converted: if the field is on the delivery label, the checkout stops and the customer is asked to re-enter that field in Latin letters. Nothing has been charged at that point.
Each converted value is also recorded in a private order note with the original, so staff can still see “Zoë” where the label says “Zoe”.
Some examples:
Straße 5becomesStrasse 5O’Brien(curly apostrophe) becomesO'Brien- A non-breaking space becomes an ordinary space
1st Floor ¾becomes1st Floor 3/4Tokyo(fullwidth letters) becomesTokyoМосква,תל אביבand東京can’t be converted, so the customer is asked to re-enter them
Which address can stop a checkout
Only the address the label is printed from can stop a checkout:
- The cart ships and “Ship to a different address” is ticked: the shipping address.
- The cart ships and it isn’t ticked: the billing address, because WooCommerce uses it for shipping.
- Nothing in the cart ships, or the customer chose local pickup: nothing is checked.
So a customer with a Cyrillic billing address who is sending a gift to Leeds can still check out.
Setting it up
- Download the zip from the latest release.
- In WordPress, go to Plugins → Add New Plugin → Upload Plugin and upload it.
- Activate it.
Updates arrive through the normal WordPress updates screen.
Check it’s working
Place a test order with an accented name, such as Zoë in Leeds. The address on the order should say Zoe, and a private note should list the change. Then try a shipping address in Cyrillic, such as Москва. The checkout should stop with the message before you reach payment.
What it doesn’t do
- Orders created in the admin, through the REST API or by an import aren’t checked.
- The pay-for-order page isn’t checked.
- Editing an address in My Account isn’t checked until the next checkout.
- Extra checkout fields added by other plugins are left alone.
- It doesn’t transliterate other scripts. It asks the customer instead.
Some characters look like Latin letters but aren’t, such as a Cyrillic а copied in from a web page. Those get refused, and the customer can’t see why. If you find one with a sensible ASCII equivalent, let me know in the comments.
For developers
The most likely change is to bypass the plugin for specific orders. This example only processes orders with one shipping method, so replace flat_rate:3 with your own method ID:
/**
* Only convert and check addresses for one shipping method.
*
* @param bool $process Whether to process the checkout.
* @return bool Whether to process the checkout.
*/
function example_latinaddr_one_method_only( $process ): bool {
$chosen_methods = WC()->session ? (array) WC()->session->get( 'chosen_shipping_methods', array() ) : array();
return (bool) $process && in_array( 'flat_rate:3', $chosen_methods, true );
}
add_filter( 'latinaddr_process_checkout', 'example_latinaddr_one_method_only' );The full list of hooks is in the hooks and filters guide.
Privacy and technical notes
The plugin stores its installed version and a hash on orders that have a conversion note, so a repeated event doesn’t add the note twice. The order note holds the customer’s original values and stays with the order. It never writes address values to the server log.
The only outbound request is the update check, which asks GitHub for the latest release and caches the answer for 12 hours.
- Requires WordPress 6.9, PHP 8.2 and WooCommerce 8.3 or later
- Compatible with High-Performance Order Storage and the Checkout block
- Translations are bundled for German, Greek, British English, Spanish, French, Italian, Dutch and Polish. They’re machine-translated, so tell us if one reads badly.
