Get country in English
-
I’m using an external API to create legal fiscal invoices for the completed WooCommerce invoices and that API needs the country name in english.
If the order was made in the english version of the website everything is ok but if the order was submitted by the portuguese (or other language for all that matters) version then I get the translated country name and I get a API error on the external service.
I’m using
$woocommerce->countries->countries[$order->billing_country]
to get the country name.How can I get the English country name no matter what the current order language is?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Get country in English’ is closed to new replies.