Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 20 replies, has 2 voices.

Last updated by Bruno 9 months, 2 weeks ago.

Assigned support staff: Bruno.

Author Posts
December 26, 2019 at 7:04 am #5194913

garyM-10

Hi,

Thanks for the help.

Now the wpml_language has value in post meta table for orders but my root issue not solved. Still the _icl_current_language is empty on post meta table for orders.

Before WPML update, the _icl_current_language had values.

Please check the issue.

Thanks.

December 26, 2019 at 1:57 pm #5196243

Bruno

Hi,

As I explained earlier, this has probably changed in the latest version of WCML. The "_icl_current_language" option has been changed by "wpml_language". Within WCML no references are found to "_icl_current_language" anymore.

That is, if you want to use this information within your plugin or theme, you will need to check both terms in order to retrieve old purchases that were defined with "_icl_current_language" and new purchases with "wpml_language" "

Please also note that as this is internal WCML information, you should look for some other way to check the language of a certain order using one of our hooks: https://wpml.org/documentation/support/wpml-coding-api/wpml-hooks-reference or https://wpml.org/documentation/related-projects/woocommerce-multilingual/wcml-hooks-reference/.

Or you could try using some WCML method to retrieve this information. That way, even if WCML changes the name of the custom field, your code will return the correct language.

Thank you.

January 2, 2020 at 10:19 am #5222375

garyM-10

Hi,

I have checked the postmeta table again and found the _icl_current_language meta key is not deprecated on new WPML. You can see the meta key _icl_current_language is there on new orders but meta value is empty. hidden link

How that happen if the WPML new version removed the _icl_current_language from post me ta table for orders?

Also which changes we have to make if we start to using the "WooCommerce Multilingual" plugin? We are currently not using that plugin with WooCommerce.

January 2, 2020 at 12:42 pm #5223547

Bruno

Hello,

This may be being inserted in some other way - maybe some custom coding. At the moment, if I search for "_icl_current_language" within the WooCommerce Multilingual source code, nothing is found. That is, no WooCommerce Multilingual file is defining or selecting this custom post meta.

Also, inside the database, in a fresh installation with only basic plugins enabled, I no longer see the custom field "_icl_current_language". The "wpml_language" option, however, appears inside the files. For this reason, I mentioned above that this custom field has been deprecated.

>>> Also which changes we have to make if we start to using the "WooCommerce Multilingual" plugin? We are currently not using that plugin with WooCommerce.

WooCommerce is the bridge between WooCommerce and WPML. There are several options you can configure to suit your needs. You can see more details in our documentation: https://wpml.org/documentation/related-projects/woocommerce-multilingual/

Thank you.

January 9, 2020 at 7:12 am #5258977

garyM-10

I didn't say we are using WooCommerce Multilingual plugin. We are not using that plugin.

Can you check the staging site and please let me know can we use the WooCommerce Multilingual plugin as we are already translated products without that plugin? Do we have to change any settings on WPML in order to use this WooCommerce Multilingual plugin?

January 9, 2020 at 12:30 pm #5261573

Bruno

>>> ... can we use the WooCommerce Multilingual plugin as we are already translated products without that plugin?

Yes. Having products already translated should not impact and your site should continue to work properly.

>>> Do we have to change any settings on WPML in order to use this WooCommerce Multilingual plugin?

No. Initially you will not need to configure anything (WPML or WooCommerce Multilingual). If you wish, you can translate WooCommerce slugs (the endpoints), add currency features for each language, allows translation of the description of shippings into the cart, etc. If you do not want to translate the previous content, WCML will still be working to synchronize stocks, allow coupons to function properly, etc.

Please, install WCML in your stanging environment and let me know if your site is still working properly, as expected, even if the products have already been translated.

Thank you.

The topic ‘[Closed] _icl_current_language is empty for orders with WPML 4.3.3’ is closed to new replies.