Skip to content Skip to sidebar

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

Problem:
The client is unable to display translated WooCommerce products on their site's home page, for logged out users.

Solution:
We didn't find any problem except that we deactivated and activated all plugins one by one and it started working.

If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable to your case, we 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 the problem persists, please open a new support ticket at our support forum for further assistance.

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

Last updated by Waqas Bin Hasan 1 year, 9 months ago.

Assisted by: Waqas Bin Hasan.

Author Posts
July 31, 2024 at 10:01 am

tonyJ-7

Background of the issue:
I am trying to display a translated WooCommerce product on my site hidden link. I have implemented the provided code, executed it, and cleared the caches, but it didn't help. The code added to the functions.php file is:

function wpmlsupp_1706_reset_wpml_capabilities() {
if ( function_exists( 'icl_enable_capabilities' ) ) {
icl_enable_capabilities();
}
}
add_action( 'shutdown', 'wpmlsupp_1706_reset_wpml_capabilities' );

I have also taken a full backup of my website and database beforehand.

Symptoms:
The translated WooCommerce product does not show on the site.

Questions:
Why is the translated WooCommerce product not showing on my site after implementing the code and clearing the caches?

July 31, 2024 at 12:44 pm #16025226

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for your patience and cooperation. I am still working on this and 'll get back to you accordingly.

August 1, 2024 at 6:29 am #16027694

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for your patience and cooperation.

I've activated all plugins one by one and it seems to work just fine at hidden link. Sometimes, deactivating and activating plugins again fixes their relevant processes (i.e. a skipped piece of code or DB entry). However, I couldn't find a proper explanation of this.

In short, I can not reproduce the issue in the staging site anymore.

So probably, if you deactivate all plugins in your live site and then activate one by one, starting with WPML, it may fix the problem.

IMPORTANT: Please take full backup of your website and database beforehand. 

Let me know if it works.

August 1, 2024 at 9:33 am #16028687

tonyJ-7

Sometimes a proper explanation isn't needed, when it works it works and today it did. 🙂

Thanks for your help!