Skip Navigation

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

Problem:
Hello, I'm using woodmart theme and wpml which theoretical it is compatible with your module; but even if I select copy on custom term the header banner, category icon and icon alt won't copy to new languages and I need to set them manually.

Solution:
Go to wp-content/plugins/sitepress-multilingual-cms/classes/taxonomy-term-translation/, edit the class-wpml-sync-term-meta-action.php file and on lines 68-69, replace this function adjust_ttid_for_term_id with adjust_term_id_for_ttid.

Basically, the code will turn from this:

$term_id_to   = $this->sitepress->term_translations()->adjust_ttid_for_term_id( $term_taxonomy_id_to );
$term_id_from = $this->sitepress->term_translations()->adjust_ttid_for_term_id( $term_taxonomy_id_from );

into this

$term_id_to   = $this->sitepress->term_translations()->adjust_term_id_for_ttid( $term_taxonomy_id_to );
$term_id_from = $this->sitepress->term_translations()->adjust_term_id_for_ttid( $term_taxonomy_id_from );

Relevant Documentation:
https://wpml.org/documentation/related-projects/woocommerce-multilingual/

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

Last updated by John 7 months, 1 week ago.

Assigned support staff: Radu.

Author Posts
April 11, 2020 at 10:29 pm #5890249

John

Hello, I'm using woodmart theme and wpml which theoretical it is compatible with your module; but even if I select copy on custom term the header banner, category icon and icon alt won't copy to new languages and I need to set them manually?
Am I missing something?
hidden link

I'm currently on stage website (which backups every day) so I can give you access on it if you want.

April 14, 2020 at 7:40 am #5901599

Radu
Supporter

Languages: English (English )

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

Hey John,

I tried to set the same fields to copy, added an image to each field of the product category, then translate the category. I also installed the same theme as you (because the image fields wouldn't be available otherwise). The images were copied as expected on the translation.

Can you tell me if the images are still not appearing if you create a new translation of a category, please?

Thansk,
Radu

April 14, 2020 at 10:44 am #5903359

John

Salut Radu ( ma bucur ca te-am gasit aici),
Unfortunately, it doesn't work on my end, moreover, I have found another issue with the same theme & wmpl (related to ajax product tabs, currency).
Please tell me how would you like to proceed:
A. Record my screen
B. Give you access to my website (since it is under development + it is backing up every day so I won't lose anything on it)
Waiting for your answer and thanks in advance.

April 16, 2020 at 11:29 am #5921959

Radu
Supporter

Languages: English (English )

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

Hey John,

Sorry for this delayed response. I was trying to replicate this issue on my side, thinking that there's some option that I missed while testing the category icons.

It would be great if you could give me access to the dashboard area so I can have a closer look at this. The next reply is set to be private so you can safely send me the credentials.

Regarding the Ajax product tabs, it would be great if you could open a separate ticket for that. This way, one of my colleagues can check that too, while I'm still working on the category icons (and this way we'll get everything resolved faster).

Thanks,
Radu

April 23, 2020 at 11:14 am #5976143

Radu
Supporter

Languages: English (English )

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

Hey John,

Can you have a look at my last reply, please? It's set to be private and you might not get a notification about it (it's a temporary issue from our system that we're working to fix).

Thanks,
Radu

April 25, 2020 at 7:16 pm #5993785

John

Hello, migration is complete.
Please don't delete the copy of the website because I still have some other issues that need to be resolved and I have used the same link to other open tickets.
Thanks 🙂

April 27, 2020 at 9:35 am #6000847

Radu
Supporter

Languages: English (English )

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

Hey John,

Thank you for doing this migration. I created a new category on the website copy, to make sure that the issue is still available (and it is).

I checked all the settings again and, since everything looks just like on my testing website (where things work fine), I asked my colleagues to have a look at this. I'll keep you posted about this as soon as they get back to me (which shouldn't take long).

Thanks,
Radu

April 27, 2020 at 9:38 am #6000881

John

Ok perfect,
Also please note to not delete the migration website after the issue is resolved. There are other tickets opened and I have listed the link to migration so your colleagues can look onto it.
Thanks

April 27, 2020 at 9:50 am #6001043

Radu
Supporter

Languages: English (English )

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

Hey John,

Don't worry, I will not delete the migration.

We'll hear you back soon 🙂

Radu

April 27, 2020 at 3:23 pm #6003769

Radu
Supporter

Languages: English (English )

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

Hey John,

One of my colleagues checked this out, thinking that maybe there's something that I'm missing. However, it seems that this requires a closer look (including on the code) so I escalated it to the 2nd tier support.

I will keep you posted about the progress we're making on this, as soon as we find anything helpful regarding the issue.

Thanks,
Radu

April 29, 2020 at 11:57 am #6021079

Radu
Supporter

Languages: English (English )

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

Hey John,

I'm back with a temporary fix from my colleagues. This is escalated to the WPML core too, but we managed to find an early fix that you can implement until we implement this on the WPML plugin.

Please go to wp-content/plugins/sitepress-multilingual-cms/classes/taxonomy-term-translation/, edit the class-wpml-sync-term-meta-action.php file and on lines 68-69, replace this function adjust_ttid_for_term_id with adjust_term_id_for_ttid.

Basically, the code will turn from this:

$term_id_to   = $this->sitepress->term_translations()->adjust_ttid_for_term_id( $term_taxonomy_id_to );
$term_id_from = $this->sitepress->term_translations()->adjust_ttid_for_term_id( $term_taxonomy_id_from );

into this

$term_id_to   = $this->sitepress->term_translations()->adjust_term_id_for_ttid( $term_taxonomy_id_to );
$term_id_from = $this->sitepress->term_translations()->adjust_term_id_for_ttid( $term_taxonomy_id_from );

You can make this change, then create a new category and tell me if the images are copied when you add the translation for it.

Thanks,
Radu

April 29, 2020 at 12:00 pm #6021161

John

Hey Radu thanks for the fix. I will try then come back and tell you if everything works.
But I would like to know if it possible to sync all categories because I have 7 languages and all categories all already translated.
Waiting for your answer. All the best!

April 29, 2020 at 12:42 pm #6021565

John

My issue is resolved now. Thank you!

I have updated all categories from all languages manually the issue seems to be fixed. Thanks for your support and really appreciate. Please don't forgot to not delete the migration because it is used on other topics.