 rowanS-4
|
Yes, if in the end this will be deleted. I'm completely fine with this!
|
 Dražen
Supporter
Languages:
English (English )
Timezone:
Europe/Zagreb (GMT+02:00)
|
Hello,
of course, all sensitive data is removed.
I have taken the copy and shared it with our 2nd tier.
Regards,
Drazen
|
 Dražen
Supporter
Languages:
English (English )
Timezone:
Europe/Zagreb (GMT+02:00)
|
Hello,
our 2nd tier found the issue and it is another instance of known issue.
You need to go to WPML > Settings and set "Copy taxonomy to translations" is not set. It general shouldn't need to be, and we are going to escalate it further for permanent fix.
After checking that setting and with the fix from the erratum it is now working correctly on my local copy of the client site.
- https://wpml.org/errata/manually-editing-translated-variable-products-loses-variations/
Please check.
Regards,
Drazen
|
 rowanS-4
|
Hi Drazen,
but this creates a different issue for our first post we had together.
In that post you've made me disable this option...
So how to proceed from here?
|
 Dražen
Supporter
Languages:
English (English )
Timezone:
Europe/Zagreb (GMT+02:00)
|
Hello,
you are right, and apologize for that, I forget we have disabled this together.
I will check again with 2nd tier if any other workaround, but in the meantime you can fix the issue each time after save via WPML > Support > Troubleshooting > Synchronize Products > Synchronize variations.
I know it is not the best solution, but is okay workaround while we wait for 2nd tier.
Regards,
Drazen
|
 rowanS-4
|
The workaround doesn't work for me. Perhaps I'm doing it wrong, could you explain, step by step how you make it work on a product like the following.
I;ve tried to apply that with this product:
hidden link
It has the 'Wordpress editor' so I can have a different design in English. But as soon as I add the tag. The products variations aren't able to be selected anymore.
Could there be a conflict with the swatch plugin?
It suddenly says in the HTML like it is out of stock. Even though we do not keep stock..
|
 Dražen
Supporter
Languages:
English (English )
Timezone:
Europe/Zagreb (GMT+02:00)
|
Hello,
thanks for getting back, no need to repeat the issue, we already confirmed the bug on our side and escalated it, so we are aware of the problem and issue and how it is caused.
Can you please adjust the code as explained bellow, it should work fine then:
In woocommerce-multilingual/classes/Synchronization/Component/Taxonomies.php.
Find next code that looks like this:
private function runForTranslation( $productId, $translationId, $language ) {
$taxonomyExceptions = [ 'product_type', 'product_visibility' ];
$taxonomies = $taxonomyExceptions;
if ( $this->sitepress->get_setting( 'sync_post_taxonomies' ) ) {
$taxonomies = get_object_taxonomies( 'product' );
}
Change the code to look like:
private function runForTranslation( $productId, $translationId, $language ) {
$taxonomyExceptions = [ 'product_type', 'product_visibility' ];
$attribute_taxonomies = wc_get_attribute_taxonomies();
$taxonomy_slugs = array_map( function( $attribute ) {
return wc_attribute_taxonomy_name( $attribute->attribute_name );
}, $attribute_taxonomies );
$taxonomies = array_merge( $taxonomyExceptions, $taxonomy_slugs );
if ( $this->sitepress->get_setting( 'sync_post_taxonomies' ) ) {
$taxonomies = get_object_taxonomies( 'product' );
}
Make sure to have a backup.
Let me know how it goes.
Regards,
Drazen
|
 rowanS-4
|
Hi Drazen,
I've tried this and so far it worked. Client will be testing on his end on tuesday. I will keep you updated.
|
 Dražen
Supporter
Languages:
English (English )
Timezone:
Europe/Zagreb (GMT+02:00)
|
Hello,
great, thanks for the update and glad to hear it works fine now.
Regards,
Drazen
|