Skip to content Skip to sidebar

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

Problem:
If you're experiencing issues with your website loading indefinitely after changing the default language to German, while it works fine when set to English, we have identified a potential solution.
Solution:
We recommend modifying a specific piece of code in the YITH WooCommerce Product Bundles Premium plugin. Please navigate to

/wp-content/plugins/yith-woocommerce-product-bundles-premium/includes/objects/class.yith-wc-product-bundle-premium.php

and locate the code at line 186. Change the existing code from:

if ( isset( $sitepress ) ) {
    $found = false;
 
    $details = $sitepress->get_element_language_details( $id );
    if ( $details->trid ) {
        $current_id  = absint( $details->trid );
        $bundle_data = get_post_meta( $current_id, '_yith_wcpb_bundle_data', true );
        if ( !! $bundle_data ) {
            $id    = $current_id;
            $found = true;
        }
    }

to:

if ( isset( $sitepress ) ) {
    $found = false;
 
    $details = $sitepress->get_element_language_details( $id );
    if ( $details->element_id ) {
        $current_id  = absint( $details->element_id );
        $bundle_data = get_post_meta( $current_id, '_yith_wcpb_bundle_data', true );
        if ( !! $bundle_data ) {
            $id    = $current_id;
            $found = true;
        }
    }

This modification has been tested and found effective in resolving the loading issue. However, please note that this solution might become outdated or may not apply to your specific case. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins.

If this solution does not resolve your issue, please do not hesitate to open a new support ticket with us for further assistance at WPML Support Forum.

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.

Tagged: 

This topic contains 16 replies, has 0 voices.

Last updated by Shekhar Bhandari 3 months, 2 weeks ago.

Assisted by: Shekhar Bhandari.

Author Posts
September 5, 2025 at 9:30 am

panagiotisL-3

Background of the issue:
We have two languages on our website, German and English. We’re trying to change the default language to German.

Symptoms:
When we change the default language to German, clear the cache, and try to access the site, it loads indefinitely. When the default language is set to English, the website works fine.

Questions:
Could you please check this issue for us?

September 5, 2025 at 10:36 am #17378982

panagiotisL-3

Hi Shekhar,

I have updated the plugins and added the debug code in wp-config as well.

Now what's next ?

September 5, 2025 at 10:37 am #17378985

Shekhar Bhandari
WPML Supporter since 03/2015

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Please try to change the default language once and see if any error are logged, also, check the server error logs.

Thanks

September 5, 2025 at 10:45 am #17379006

panagiotisL-3

This is the content from my debug.log file

September 5, 2025 at 10:45 am #17379009

panagiotisL-3

05-Sep-2025 10:42:57 UTC] PHP Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the

rocket

domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the

init

action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/afroditedeca_usr/data/www/afroditedecants.com/wp-includes/functions.php on line 6121
[05-Sep-2025 10:42:57 UTC] PHP Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the

yith-woocommerce-product-bundles

domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the

init

action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/afroditedeca_usr/data/www/afroditedecants.com/wp-includes/functions.php on line 6121
[05-Sep-2025 10:43:00 UTC] PHP Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the

woo-discount-rules

domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the

init

action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/afroditedeca_usr/data/www/afroditedecants.com/wp-includes/functions.php on line 6121
[05-Sep-2025 10:43:00 UTC] PHP Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the

rocket

domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the

init

action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/afroditedeca_usr/data/www/afroditedecants.com/wp-includes/functions.php on line 6121
[05-Sep-2025 10:43:00 UTC] PHP Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the

yith-woocommerce-product-bundles

domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the

init

action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/afroditedeca_usr/data/www/afroditedecants.com/wp-includes/functions.php on line 6121

September 5, 2025 at 10:51 am #17379021

panagiotisL-3

And I don't see any error related to 504 on server log

September 5, 2025 at 11:14 am #17379103

panagiotisL-3

Hi Shekhar,

Any update ?

September 5, 2025 at 11:41 am #17379196

Shekhar Bhandari
WPML Supporter since 03/2015

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hi there,

The debug log isn’t very helpful.

Could you please share a backup of your site? I’d like to set up my localhost and debug the issue further. You can zip up the files and database and share them using a file-sharing platform.

I’ve enabled private replies for you.

Thanks!

September 5, 2025 at 12:16 pm #17379329

panagiotisL-3

Sent you the link to backup

September 5, 2025 at 12:48 pm #17379391

Shekhar Bhandari
WPML Supporter since 03/2015

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hi there,

I noticed that the issue is happening because of the memory limit on my localhost.

PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in …/wp-content/plugins/yith-woocommerce-ajax-product-filter-premium/includes/class-yith-wcan-presets.php on line 133

I deactivated the following two plugins (YITH WooCommerce Ajax Product Filter Premium & YITH WooCommerce Product Bundles Premium) and it worked for me.

Can you please check and confirm? Also, both mentioned plugins are outdated, so please update them and check once.

I’ll be away now and will be available in Monday morning.

Thanks!

September 6, 2025 at 11:48 am #17380921

panagiotisL-3

Hi,

We updated both the plugins and still facing the same issue.

It is working fine with the plugin YITH WooCommerce Product Bundles Premium deactivated but we need this plugin as we have some bundled products. So please help us find a solution.

With this plugin activated the when the default language is English both the English and German version is working.

We got in touch with the plugin support and they mentioned that if it was their plugin issues then it shouldn't be working in the English default language as well and asked us to get in touch with you.

So please look into it.

September 8, 2025 at 3:58 am #17382293

Shekhar Bhandari
WPML Supporter since 03/2015

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Thank you for the details.

Can you send me the updated zip files for both the plugins so I can debug it further?

Look forward to your reply.

Thanks

September 8, 2025 at 6:15 am #17382355

panagiotisL-3

Hi Shekhar,

I have sent you the updated plugins.

September 8, 2025 at 9:48 am #17383063

panagiotisL-3

Hi Shekhar,
Any update ?

September 8, 2025 at 11:15 am #17383356

Shekhar Bhandari
WPML Supporter since 03/2015

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I find an related issue and using the workaround from there helped me.

Kindly go to /wp-content/plugins/yith-woocommerce-product-bundles-premium/includes/objects/class.yith-wc-product-bundle-premium.php

in line 186 you would find the following code.

if ( isset( $sitepress ) ) {
                $found = false;
 
                $details = $sitepress->get_element_language_details( $id );
                if ( $details->trid ) {
                    $current_id  = absint( $details->trid );
                    $bundle_data = get_post_meta( $current_id, '_yith_wcpb_bundle_data', true );
                    if ( ! ! $bundle_data ) {
                        $id    = $current_id;
                        $found = true;
                    }
                }

Kindly change it to the following code.

if ( isset( $sitepress ) ) {
                $found = false;
 
                $details = $sitepress->get_element_language_details( $id );
                if ( $details->element_id ) {
                    $current_id  = absint( $details->element_id );
                    $bundle_data = get_post_meta( $current_id, '_yith_wcpb_bundle_data', true );
                    if ( ! ! $bundle_data ) {
                        $id    = $current_id;
                        $found = true;
                    }
                }

I've tried this workaround on my local installation, and it worked correctly. Kindly apply this workaround and let me know if it fixed the issue.

Thanks