Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client was experiencing an issue where WPML was stuck refreshing the translation status when translating pages built with Elementor.
Solution:
We provided a workaround that involves three possible solutions:
1. Turn off Nested Elements in Elementor features.
2. Modify the

wp-content\plugins\elementor-pro\modules\woocommerce\classes\products-renderer.php

file in the Elementor Pro plugin by replacing a specific line of code:

if ( is_checkout() ) {
	return;
}

with

if ( is_checkout() || ! WC()->cart ) {
	return;
}

3. Install a Must-Use (MU) plugin and add the following code to handle the issue:

<?php

/**
 * Plugin Name: WPML PB 470
 * Description: Fix PHP Fatal error: Uncaught Error: Call to a member function get_cross_sells()
 * Author URI: https://onthegosystems.myjetbrains.com/youtrack/issue/wpmlpb-470
 */

add_filter('wpml_pre_save_pro_translation', function ( $postarr ) {
    if (function_exists('wc_load_cart')) {
        wc_load_cart();
    }

    return $postarr;
});

If the solution provided here is not relevant to your case, because it might be outdated or not applicable, we recommend opening a new support ticket. We also highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins.

If you need further assistance, please contact us in the WPML support forum.

0% of people find this useful.

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.

Tagged: 

This topic contains 15 replies, has 2 voices.

Last updated by Dražen 1 year, 8 months ago.

Assisted by: Dražen.

Author Posts
April 22, 2024 at 9:02 am

giuseppeL-33

wpml stuck refreshing translation status

April 22, 2024 at 9:38 am #15549103

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

I am waiting for the staging site to be created and will check the issue further.

Please share also FTP access so I can safely check it out.

Regards,
Drazen

April 22, 2024 at 9:45 am #15549218

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks.

I have just checked staging and there it works fine. Is it okay if I disable plugins and themes on your production website to check further?

Please make sure you have a bakckup.

Regards,
Drazen

April 22, 2024 at 9:47 am #15549237

giuseppeL-33

But i need the plugins!

We need to know which plugin conflicts.
To then make the step into production.

April 22, 2024 at 9:51 am #15549290

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

As said the issue is not happening on the staging site I need to check on production. It works fine with all plugins and themes, you can confirm it yourself.

I was thinking for a moment to check, if possible to see if something causes conflict, I will enable them back.

You can also test yourself:

- Please make a backup before proceeding.
- Switch to the WP default theme
- Disable all plugins except for the WPML plugin, WooCommerce, and Elementor plugins
- Change page title and save
- Translate the page and check if works fine
- Enable back plugins and themes and check again.

Let me know how it goes.

Thanks,
Drazen

April 22, 2024 at 10:26 am #15549542

giuseppeL-33

Hi Drazen, I made a backup.
You can proceed to figure out what the conflicting issue is.
Because I need those plugins.
I hope I can stay with WPML without too many problems, otherwise I have to evaluate other solutions.
Thank you!

April 22, 2024 at 10:44 am #15549692

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks.

No worries, we will sort this out, if it works on the staging website it should work here also.

Can you please check the shared FTP, as it seems it is not working or is missing something, maybe port info?

Thanks,
Drazen

April 22, 2024 at 12:27 pm #15550267

giuseppeL-33

I updated the FTP access. Now works.

April 22, 2024 at 1:40 pm #15550894

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks.

I have checked but the issue still happens, which is weird as all looks okay and the same works okay on the staging site using the same pages and plugins.

Can you check with hosting support if they are blocking somehow maybe the WPML plugin/actions or websites or have anything in the server error logs that could be helpful?

Website:
- *.WPML.org

Let me know.

Thanks,
Drazen

April 22, 2024 at 3:23 pm #15551960

giuseppeL-33

No problem in hosting plan.

Screenshot 2024-04-22 172303.png
April 23, 2024 at 6:09 am #15553591

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks for getting back.

I have escalated this to our 2nd tier to check further, I will update you when we have some news. Please note it may take a while.

Regards,
Drazen

April 23, 2024 at 7:07 am #15553816

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

is it okay if we take a copy of your website to debug the issue further?

Thanks,
Drazen

April 23, 2024 at 8:48 am #15554428

giuseppeL-33

Yes.

I hope you resolve it soon.

Thanks,
Giuseppe.

April 23, 2024 at 10:08 am #15554941

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks I have escalated the case for our 2nd tier to check further.

Thanks,
Drazen

May 2, 2024 at 10:26 am #15586671

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

our 2nd tier have checked and issue is escalated to our devs.

As workaround you can follow next:

1) Turn off Nested Elements in Elementor features

OR

2) Edit wp-content\plugins\elementor-pro\modules\woocommerce\classes\products-renderer.php on line 249 replace

					if ( is_checkout() ) {
						return;
					}

with


					if ( is_checkout() && ! WC()->cart ) {
						return;
					}

Regards,
Drazen