Please make sure to update to WPML 4.3.4 before reporting any issue

Hi, Amit here, I am the WPML Support Manager, our current ticket queue is high, update your WPML plugins and make sure you meet the minimal requirements for running WPML before reporting an issue please - many tickets are resolved doing that

Please look at our updated list of Known Issues and you can also use our support search to find helpful information and of course review our documentation before opening a ticket.

If you do need to open a ticket please make sure to provide us with all the needed information as described in this page

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 thread is resolved. Here is a description of the problem and solution.

Problem: when using Woo Custom Related Products, in the "related products" section the related products appear in the default language, even if they are translated and the link points to the correct page.

Solution: see Relevant Documentation

Relevant Documentation: https://wpml.org/forums/topic/custom-related-products-only-partially-translated-2/#post-3346803

0% of people find this useful.

This topic contains 24 replies, has 2 voices.

Last updated by Kristoff Henry 7 months, 3 weeks ago.

Assigned support staff: Laura.

Author Posts
March 1, 2019 at 1:18 pm #3260839

Kristoff Henry

I am trying to:

Link to a page where the issue can be seen:

I expected to see:

Instead, I got:

This is to re-open the ticket I created yesterday.
I have duplicated the site, switched off plug-ins and switched to default theme twenty nineteen, as per your instructions.

The issue still exists

March 4, 2019 at 4:08 pm #3269788

Laura
Supporter

Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

Timezone: Europe/Rome (GMT+01:00)

Hi,

sorry for the delay in replying.
May I ask you to reproduce the issue here: hidden link

WPML and WooCommerce are already installed, you'll only need to install the Woo Custom Related Products plugin and see if you can reproduce the issue.

March 5, 2019 at 7:10 pm #3275816

Kristoff Henry

Hi Laura,

Yes, I was able to reproduce the issue.

Please check this product: hidden link
When you switch to 'Français' with the language switcher, you will see that the title of the accessory remains in Dutch.

March 6, 2019 at 3:50 pm #3280121

Laura
Supporter

Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

Timezone: Europe/Rome (GMT+01:00)

Hi,

thanks for replicating, I escalated the issue to the compatibility team.

March 14, 2019 at 7:20 am #3340893

Laura
Supporter

Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

Timezone: Europe/Rome (GMT+01:00)

Hi,

in WPML -> Settings -> Custom Field Translation, search for _wcrp_related_ids (you'll need to click on "show system fields") and set it to Translate.
Than, when you translate products, you need to write the IDs for the translated products in the Translation Editor.
That should work. Please see here: hidden link

Let me know if this helps you or if you need further assistance.

March 14, 2019 at 9:38 am #3342315

Kristoff Henry

Hi Laura,

Thank you for your reply. I tried this before and it does work, but it is an enormous task (and waste of time)

In essence, it is the same as re-adding all accessoires to all translations manually. That is why I set this field _wcrp_related_ids to 'copy', so accessories were carried over to translations automatically.

Also where and how can I easily find the ID's related to the translation of a product? Because I will need to create some sort of look-up table of ID's - what a mess 🙁

March 14, 2019 at 4:09 pm #3346803

Laura
Supporter

Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

Timezone: Europe/Rome (GMT+01:00)

Hi,

our 2nd tier found a workaround.

You can add this snippet in wp-content/plugins/woo-custom-related-products/woocommerce/single-product/related.php after line 44

$‌‌related_product = apply_filters('wpml_object_id', $related_product, 'product', true);

Then if you set the _wcrp_related_ids to copy it should work.

Please notice this isn't an "official" fix. If you update the Woo Custom Related Products plugin you may have to re-add this snippet, or it may not work anymore.

March 15, 2019 at 9:43 am #3352497

Kristoff Henry

Hi Laura,

Thank you for this suggestion.

I understand that it is a volatile fix, but it would save me a massive amount of hours of work.
I added this to the code a you suggested, after line 44 (right after the 'foreach' - statement) but unfortunately I can't get it to work.

As you suggested, I set _wcrp_related_ids to copy and the related products do get copied, but still with the description in the original language.

I am wondering what else I should be doing since it seems to work on your side.

March 15, 2019 at 9:56 am #3352587

Kristoff Henry

Hi Laura,

To add to this: I just tried on the sandbox environment to replicate and there it does work.

However, the difference I saw was that after adding a related product to the original language, WMPL icon for the translation changed into the icon that tells you to update the translation.

This didn't happen on the live site - the icon was still the pencil. Perhaps this info rings a bell?

March 15, 2019 at 2:10 pm #3354567

Laura
Supporter

Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

Timezone: Europe/Rome (GMT+01:00)

Hi,

in my Sandbox too there is a pencil icon, so I don't think this is the issue. Actually, I think it's correct - since the field is being copied, the translation shouldn't be updated.

Could you try to go to WPML -> Support -> troubleshooting and click on "clear the cache in WPML"? Please do a backup before attempting this.

There is a site where I can see the issue?

March 15, 2019 at 2:29 pm #3354711

Kristoff Henry

Hi Laura,

OK, I will try this.
Yes, please look at my private message in this thread dated MARCH 1, 2019 AT 2:24 PM.
The clone of the site I created for you is still there for you to play with 🙂

March 15, 2019 at 2:59 pm #3354875

Kristoff Henry

I cleared the cache in WPML without result 🙁

Apart from that, I'm experiencing serious performance issue with the original site, but I should probably open a separate ticket for this?

March 17, 2019 at 10:59 am #3363179

Laura
Supporter

Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

Timezone: Europe/Rome (GMT+01:00)

Hi,

I'm still waiting for a reply from the 2nd tier to understand what's better to do, but the credentials for hidden link you provided during chat do not work anymore, so could you please check them? I'll enable a private reply.

March 18, 2019 at 1:44 pm #3369819

Laura
Supporter

Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

Timezone: Europe/Rome (GMT+01:00)

Hi,

yes having credentials on a site where there is the issue would be more useful, I need to see it first.

I'll enable a private reply.

Did you try to disable all other plugins except WPML + WooCommerce + Woo Custom Related to see if one of them is interfering?

March 27, 2019 at 2:59 pm #3472305

Laura
Supporter

Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

Timezone: Europe/Rome (GMT+01:00)

Hi,

I checked your site and disabled your caching plugin without apparent results, so I'd ask you to give me a copy of your site for further tests. At this point, since it works in the Sandbox, it should be either a compatibility issue with a 3rd party plugin or a server issue.

I sent you the instruction on how to create the site in my previous private message, please check it out and let me know when it's ready.