Skip to content

Instantly share code, notes, and snippets.

@xlplugins
Created December 6, 2021 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xlplugins/79acf46b16dbea3f335895c04c5b5363 to your computer and use it in GitHub Desktop.
Save xlplugins/79acf46b16dbea3f335895c04c5b5363 to your computer and use it in GitHub Desktop.
UK sublocality field in checkout
<script>(function (){
window.addEventListener('bwf_checkout_load',function(){
wfacp_frontend.hooks.addFilter('wfacp_countries_address_format', function(format){
format.gb._address_1={'keys': {'street_number': 'long_name', 'route': 'long_name', 'sublocality_level_1': 'long_name', 'sublocality_level_2': 'long_name'}, 'separator': ', '};
return format;
});
})
})();</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment