xavierC-5
Hi Bigul,
The Single Product Layout cannot be translated as it freezes all the time. No way to save it. The rest of the Layouts work fine.
Regards.
Bigul
WPML Supporter since 01/2013
Languages:
English (English )
Timezone:
Europe/Vienna (GMT+02:00)
Hello,
Welcome to the WPML support forum. I will do my best to help you to resolve the issue.
It looks like this bug is related to the following known issue.
https://wpml.org/errata/woodmart-fatal-error-when-translating-product-layouts/
I got the expected results on after adding the following code in functions.php of your child theme and clearing the caches.
add_action( 'woocommerce_before_template_part', function () {
global $product;
if ( wp_is_json_request() && ! $product ) {
$random_product = new WP_Query(
array(
'posts_per_page' => '1',
'post_type' => 'product',
)
);
while ( $random_product->have_posts() ) {
$random_product->the_post();
$product_id = get_the_ID();
}
wp_reset_postdata();
$product = wc_get_product( $product_id );
}
} );
Please try to translate the Product Layout now and make sure it is working as expected or not. Refer to the attached images for more details.
--
Thanks!
Bigul
xavierC-5
Hi Bigul,
Sorry for the delay but here in Vietnam we're on local holidays.
I'll check and revert to you asap.
Taking advantge that you are checking couple of problems, did you have time to check the media translation that is not working?
Thanks Bigul
Bigul
WPML Supporter since 01/2013
Languages:
English (English )
Timezone:
Europe/Vienna (GMT+02:00)
Hello,
Thank you for the updates. Take your time. We will wait for your feedback. I will update you shortly on the original ticket.
--
Thanks!
Bigul
xavierC-5
Hi Bigul,
I inform you that this issue has been resolved:
https://wpml.org/errata/woodmart-fatal-error-when-translating-product-layouts/
So let's please focus on the other 2 problems:
1/ Problem with the variation products showing a blank page. Main ticket. Any news on that?
2/ Media Translation is not working.
Thanks
Bigul
WPML Supporter since 01/2013
Languages:
English (English )
Timezone:
Europe/Vienna (GMT+02:00)
Hello,
Thank you for the updates and confirmation. Please check my last reply on both tickets and share your feedback there. That would be very helpful.
--
Thanks!
Bigul