I’m developing a complementary plugin for woocommerce
.
I have a sql request that gets all the order and customer info, but i need to get the language from the order.
How can i detect the language was using a customer when he made an order? Is it registered somewhere?
In other CMS
like prestashop
it’s stored as id_lang
in orders and customer tables.
Without getting into which plugin you will chose and how it operates, here is how you would save some extra data to the order.
And because I had an awful time the one time I tried to use WPML, maybe consider checking out Multilingual Press.
Finally solved, both solutions are OK.
With WPML plugin you can get the value in the table
postmeta
with themeta_key = wpml_language
Just added a left join in my SQL query: