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.

Sun Mon Tue Wed Thu Fri Sat
- 12:00 – 14:00 12:00 – 14:00 12:00 – 14:00 12:00 – 14:00 12:00 – 14:00 -
- 17:00 – 21:00 17:00 – 21:00 17:00 – 21:00 17:00 – 21:00 17:00 – 21:00 -

Supporter timezone: Europe/Vienna (GMT+02:00)

Tagged: 

This topic contains 5 replies, has 0 voices.

Last updated by Bigul 1 day, 1 hour ago.

Assisted by: Bigul.

Author Posts
April 24, 2025 at 10:28 am #16963807

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.

16941587-Image_015.jpg
April 24, 2025 at 1:20 pm #16964625

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

2025-04-24_16h00_15.png
2025-04-24_15h59_35.png
April 29, 2025 at 11:23 am #16978589

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

April 29, 2025 at 2:47 pm #16979865

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

May 5, 2025 at 9:04 am #16995311

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

May 5, 2025 at 1:39 pm #16996519

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