Skip Navigation

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

Last updated by Kor 1 year, 7 months ago.

Assisted by: Kor.

Author Posts
May 26, 2023 at 8:23 am #13721071

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Hi there,

Thanks for your reply.

Yes, you can apply the fix on the live site. But please backup before you proceed. If you don't know how to do that, please let me know and I will apply the fix for you.

Our compatibility will contact the plugin author about the issue. For now, please use the workaround provided.

Thanks!

kor

May 26, 2023 at 8:26 am #13721081

maciejU

Please kindly help me to apply it.

May 26, 2023 at 2:05 pm #13723683

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Hi there,

Sorry for the delays. I've made the changes for you and could you please try now?

Thanks!

Kor

May 27, 2023 at 12:47 pm #13726151

maciejU

Hi Kor,
so Ive tested on the product I've changed before (one of the first ones) and the values are not copied. I tried on Italian by updating the values to trigger the update in the languages, also I've deleted the Italian product and translated it from the beginning but it didn't help. I tried to synchronise the variants from Status and the option i show in the picture but it's 0 so i cannot resync it. The product I am talking about is this one:

hidden link

Regarding the products which I haven't set up before, copied the colour but not the sizes:

hidden link

Screenshot 2023-05-27 at 13.34.09.png
May 29, 2023 at 5:07 pm #13734437

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Hi there,

Thanks for your reply.

I noticed that you're using a different version of the "CommerceGurus CommerceKit" when I compared it here hidden link .

Could you please back up the live site so that I could try to downgrade the plugin? I'd like to test and see if it works with the older version. Let me know when you've done that.

Thanks!

Kor

May 29, 2023 at 6:46 pm #13734907

maciejU

Hi Kor,
I cannot downgrade as the size chart didn't work since they released the update. I've tested this before the update on the plugin.

May 29, 2023 at 8:49 pm #13735301

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Hi there,

Thanks for your reply.

I've escalated this to our 2nd Tier Support and I will come back to you once I hear from them.

Thanks!

Kor

June 1, 2023 at 10:38 am #13753055

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Hi there,

Thanks for your patience.

The update broke the fix and our 2nd Tier Support suggested that you use the manual method as explained here.

1. Go to WPML > Settings > Custom Fields Translation > Set "commercekit_attribute_swatches" custom field as "Translate" as shown in the attached screenshot.

2. Then, edit your translated products and manually configure the "Swatches" hidden link

That's all.

Please let me know how it goes.

Thanks!

Kor

Screenshot 2023-06-01 at 6.37.10 PM.jpg
June 1, 2023 at 9:00 pm #13757803

maciejU

Hi Kor,
thank you but you know this is long. For 1044 products which I have now and 5 additional languages, I will need to manually edit 5220 products, which will take me forever

June 2, 2023 at 5:17 pm #13763279

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

Yes, I understand. Please allow me to check with our 2nd Tier Support again to see if they have another workaround to fix this. I will come back to you as quickly as possible.

June 5, 2023 at 2:29 pm #13772171

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience.

We have a solution. The plugin author switched the code to another PHP file. Please refer below.

Workaround
Open .../wp-content/plugins/commercegurus-commercekit/includes/admin-attribute-swatches.php.

Look for line 207.

Change:

$swatch_html = commercekit_as_get_swatch_html( $swatch_type, $attribute_swatches[ $attribute_id ][ $item->term_id ], $item );

For:

$wpml_default_lang = apply_filters('wpml_default_language', NULL);
		$swatch_html = commercekit_as_get_swatch_html($swatch_type, $attribute_swatches[$attribute_id][apply_filters('wpml_object_id', $item->term_id, 'category', FALSE, $wpml_default_lang)], $item);

Please let me know if it fixes it.

IMPORTANT: Please, note, a backup is required for security reasons, and to avoid any data loss, you can use the https://wordpress.org/plugins/updraftplus/ plugin for these backup needs.

June 14, 2023 at 8:47 am #13822903

maciejU

Hi Kor,
What I have seen that the new products Ive have added are ok. I will try to find work around the old ones. For example:

hidden link

I think we can close the topic. Thank you for your help! Really appreciate it. Also send the code to the theme devs for them to fix the issue.

June 14, 2023 at 8:59 am #13823171

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your feedback.

Alright then, good luck with your project and feel free to contact us again if you need anything further. Closing this ticket.