Home›Support›English Support›[Resolved] woo-commernce app cant load the order if active WPML String Translation
[Resolved] woo-commernce app cant load the order if active WPML String Translation
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is experiencing issues with checking orders in the WooCommerce app, which was identified to be caused by the WPML String Translation plugin.
Solution: We recommend the following workaround to address the issue with PHP 8.1.X: 1. Edit the file
if ( $orderLanguage !== $language && !empty($language)) {
The issue arises because the app does not set the
$language
parameter, leading to a notice when WPML tries to match the order language with the current language, which is not set in the app.
If this solution does not apply to your situation, or if it seems outdated, we highly recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. Should you need further assistance, please do not hesitate to open a new support ticket in the WPML support forum.
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.
I am trying to: check order in woo-commerence app, and i try to disble plugin one by one , and found it is cause by WPML String Translation, do anyone have idea why it is happen and how to solve it ?
Actaully it is both working in desktop and mobile web in dashboard,
It is just not working woo-commernce app which download in google app store and ios apple store,
i asked woo-commernce support , their reply is Since you've identified that the WPML plugin isn't compatible with the WooCommerce app, so unfortunately, we can't offer support for it.
So i ask if wpml know what problem is it , as wpml string translation should be lot of woo-commerence user use it , should have someone face it before
If the issue doesn't happen on the web version, I'm afraid that we can be very helpful in this case as the mobile App is not compatible with WPML, as WooCommerce support stated.
I try to create a new site with wpml to test, i found that once there set a second language in setup, even havent translate anything, the woo-commerence app cant check the order. if dsiable WPML Multilingual CMS or WPML String Translation plugin, it is worfking fine
Sound really a compatible problem , and it is not happen my other project using polylang
I would need to look closely at your site, so I would need to request temporary access (WP-Admin and FTP) Preferably to a test site where the problem has been replicated.
Your answer will be private, meaning only you and I can access it.
❌ Please backup your database and website ❌
✙ I would need your permission to de-activate and re-activate the Plugins and the Theme and change configurations on the site. This is also a reason the backup is critical.
✙ I also need your permission to take a local copy of your site to debug the issue without affecting your live site.
✙ Please share the app download URL to check the issue.
Thank for your demo site , that made me solve the problem finally , i copy your demo site to my side and still have a problem, and i check the logs, there have an php warming
[06-Mar-2024 14:49:38 UTC] PHP Warning: Undefined array key "line_items" in /home/shusquare/www/bestore/wp-content/plugins/woocommerce-multilingual/classes/Rest/Wrapper/Orders/Languages.php on line 46
[06-Mar-2024 14:49:38 UTC] PHP Warning: foreach() argument must be of type array|object, null given in /home/shusquare/www/bestore/wp-content/plugins/woocommerce-multilingual/classes/Rest/Wrapper/Orders/Languages.php on line 46
and i try to use php version 7.4 (before i use 8.1), and then it is working, may be some function on your site in line 46 is not a support funtion in php 8. May be your can pass this info for the developer for update the script if need
It's great to hear that the issue is fixed 🙂 . Please don't hesitate to open a new ticket if you face any other issues. We are always happy to help you.
Our 2nd tier support team has found a workaround to work with PHP 8.1.X. Please check the following steps:
1- Edit the (wp-content/plugins/woocommerce-multilingual/classes/Rest/Wrapper/Orders/Languages.php) file
2- Replace the following line: Line 45
if ( $orderLanguage !== $language ) {
With
if ( $orderLanguage !== $language && !empty($language)) {
The problem, as far as we can see, is that the app does not set the parameter:
$language = get_query_var( 'lang' )
WPML tries our logic and produces a notice because the order language does not match the current language. In the app, there is no way to set a language.
I hope this helps you fix the issue. Please let me know if you need further assistance.