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 4 replies, has 2 voices.

Last updated by Lauren 5 months, 1 week ago.

Assigned support staff: Lauren.

Author Posts
October 23, 2018 at 10:00 am #2841747

franckv-2

I'm using WP All Import to update Woocomerce order status.
On a specific install of wordpress this classic import doesn't work.
I've contacted the WP all import and they find a solution.
But it seems that is partly your fault and that you may fix this from your side too for a more sustainable solution.

Here is the message from WP all import team :

There's an error caused by the WPML plugin:

[16-Oct-2018 14:19:44 UTC] Backtrace from Exception "String expected as argument."In /home/mysite/staging.my-site.com/wp-content/plugins/wp-all-import-pro/libraries/XmlImportStringReader.php [line 38]/home/mysite/staging.my-site.com/wp-content/plugins/wp-all-import-pro/libraries/XmlImportParser.php 107 calling __construct() | /home/mysite/staging.my-site.com/wp-content/plugins/wpml-all-import/includes/rapid-addon.php 878 calling factory() | /home/mysite/staging.my-site.com/wp-content/plugins/wpml-all-import/includes/rapid-addon.php 141 calling helper_parse() | /home/mysite/staging.my-site.com/wp-content/plugins/wp-all-import-pro/models/import/record.php 1571 calling parse() | /home/mysite/staging.my-site.com/wp-content/plugins/wp-all-import-pro/controllers/admin/import.php 2829 calling process() | /home/mysite/staging.my-site.com/wp-content/plugins/wp-all-import-pro/wp-all-import-pro.php 652 calling process() | /home/mysite/staging.my-site.com/wp-includes/class-wp-hook.php 286 calling adminInit() | /home/mysite/staging.my-site.com/wp-includes/class-wp-hook.php 310 calling apply_filters() | /home/mysite/staging.my-site.com/wp-includes/plugin.php 453 calling do_action() | /home/mysite/staging.my-site.com/wp-admin/admin.php 156 calling do_action()

Unfortunately, their plugin is using a version of our rapid-addon.php file that contains a bug. To fix it, I've updated this file: /wp-content/plugins/wpml-all-import/includes/rapid-addon.php

from this:

$data[$option_name] = XmlImportParser::factory($xml, $cxpath, $import->options[$this->slug]['xpaths'][$option_name], $file)->parse($records);
$tmp_files[] = $file;
}
} else {
$data[$option_name] = XmlImportParser::factory($xml, $cxpath, $import->options[$this->slug][$option_name], $file)->parse();

to this:

$data[$option_name] = XmlImportParser::factory($xml, $cxpath, (string) $import->options[$this->slug]['xpaths'][$option_name], $file)->parse($records);
$tmp_files[] = $file;
}
} else {
$data[$option_name] = XmlImportParser::factory($xml, $cxpath, (string) $import->options[$this->slug][$option_name], $file)->parse();

I would suggest contacting WPML about this as it should be something they can fix: https://wpml.org/forums/forum/english-support/.

October 23, 2018 at 7:05 pm #2843929

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Thank you for contacting WPML support. Thanks so much for sharing this snippet from WP All Import. I actually have another ticket with a client trying to import orders as well, and I will share this solution.

I also sent this information to the lead developer in WPML All Import so that they can implement this in a future release.

Thanks again for making us aware of this.

October 26, 2018 at 12:50 pm #2853042

franckv-2

Hi,
I think you have read my message too fast.
This snippet works, but the fix needs to be done by WPML not by WP all import as you are using the wrong version of one of their plugin.
I'm sure you'll find a solution with them.

Please tell me when a viable solution is published to know when I can update future version of my plugins without erasing this snippet.

thanks.

October 26, 2018 at 2:38 pm #2853362

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

I understood you correctly, and I forwarded this to our internal WPML All Import developer as mentioned above. I'm not sure which version of a future release it will be included in, but I will let you know once I find out.

May 15, 2019 at 12:24 pm #3816403

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

This should be resolved with the latest versions of WP All Import and WPML All Import Please update and let me know if everything is now working correctly on your end. Thanks!