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 where product bundles display correctly in English but show no products when switching to Arabic on your WooCommerce site, we have a solution for you.
Solution:
First, ensure you back up your entire website. Then, follow these steps:
1. Navigate to Plugins > Plugin File Editor.
2. Select WooCommerce Multilingual and Multicurrency and go to the file /compatibility/WcProductBundles/class-wcml-product-bundles.php.
3. Locate the following code:

if ( ! $translated_item_id ) {<br />    $menu_order = $this->wpdb->get_var(<br />        $this->wpdb->prepare(<br />            "SELECT menu_order FROM {$this->wpdb->prefix}woocommerce_bundled_items<br />            WHERE bundle_id=%d AND product_id=%d",<br />            $bundle_id,<br />            $product_id<br />        )<br />    );<br /><br />    $this->wpdb->insert(<br />        $this->wpdb->prefix . 'woocommerce_bundled_items',<br />        [<br />            'product_id' => $translated_product_id,<br />            'bundle_id'  => $translated_bundle_id,<br />            'menu_order' => $menu_order,<br />        ]<br />    );<br />    $translated_item_id = $this->wpdb->insert_id;<br />    $this->set_translated_item_id_relationship( $item_id, $translated_item_id, $lang );<br />}

and ADD the following code below it:

$check = $this->wpdb->get_var(<br />    $this->wpdb->prepare(<br />        "SELECT bundled_item_id FROM {$this->wpdb->prefix}woocommerce_bundled_items<br />        WHERE bundled_item_id = %d AND bundle_id = %d",<br />        $translated_bundle_id,<br />        $translated_product_id<br />    )<br />);<br />if ( !$check ) {<br />    $menu_order = $this->wpdb->get_var(<br />        $this->wpdb->prepare(<br />            "SELECT menu_order FROM {$this->wpdb->prefix}woocommerce_bundled_items<br />            WHERE bundle_id=%d AND product_id=%d",<br />            $bundle_id,<br />            $product_id<br />        )<br />    );<br /><br />    $this->wpdb->insert(<br />        $this->wpdb->prefix . 'woocommerce_bundled_items',<br />        [<br />            'bundled_item_id' => $translated_item_id,<br />            'product_id' => $translated_product_id,<br />            'bundle_id'  => $translated_bundle_id,<br />            'menu_order' => $menu_order,<br />        ]<br />    );<br />}

4. Go to the Products tab, filter by Bundles, and perform a Bulk update without making any changes.

This solution might be outdated or not applicable to your specific case. If the issue persists, we highly recommend checking related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If needed, please open a new support ticket.

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 6 replies, has 0 voices.

Last updated by Lucas Vidal de Andrade 10 months, 1 week ago.

Assisted by: Lucas Vidal de Andrade.

Author Posts
July 1, 2025 at 7:00 pm #17189938

abdullahA-127

i have found a solution to the issue, i just bulk uploaded the products image url again for the arab products and it is fixed now.
We can move to the next issue in which product bundles shows in english but when i change the language to arabic, the bundle shows no product.

english link - hidden link

arabic link - hidden link

kindly check it out please.

This is the last issue for this site.

July 1, 2025 at 7:02 pm #17189968

Lucas Vidal de Andrade
WPML Supporter since 11/2023

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: Europe/Vienna (GMT+02:00)

Hello there,

I've noticed that if you manually update the original product and save, the translation gets updated, and the issue is solved — bundle shows on translation. I couldn't figure a way to do that in bulk, unfortunately.

Please send me the Google Drive link with the backup found on All In One WP Migration > Backups, as I've requested previously. This way I can investigate the issue better.

July 1, 2025 at 8:02 pm #17190124

abdullahA-127

hi, if we can do it manually, that too is fine by me, I can do it one by one.
I tried to do for one product manually, but it didn't work out.
Can you please inform me what you did to enforce the change.

The product i tried - hidden link

July 2, 2025 at 8:57 pm #17194839

Lucas Vidal de Andrade
WPML Supporter since 11/2023

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: Europe/Vienna (GMT+02:00)

I checked again, and the solution didn't seem to work. I've escalated your ticket internally and will get back to you as soon as I have feedback. Thank you for your patience.

July 7, 2025 at 10:41 pm #17211338

abdullahA-127

Hi Lucas. Any update on the issue please.

July 8, 2025 at 4:36 pm #17215487

Lucas Vidal de Andrade
WPML Supporter since 11/2023

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: Europe/Vienna (GMT+02:00)

Hey there,

We still haven't figured out a solution, but we are analyzing it internally. I'll get back to you as soon as I have new information, ok? Thank you for your patience.

July 9, 2025 at 5:47 pm #17220634

Lucas Vidal de Andrade
WPML Supporter since 11/2023

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: Europe/Vienna (GMT+02:00)

Hello there,

We were able to find a solution. Please make a full website backup and follow these steps:

1. Go to Plugins > Plugin File Editor
2. Select WooCommerce Multilingual and Multicurrency and go to the file /compatibility/WcProductBundles/class-wcml-product-bundles.php
3. Find the code:

					if ( ! $translated_item_id ) {
						$menu_order = $this->wpdb->get_var(
							$this->wpdb->prepare(
								" 
                            SELECT menu_order FROM {$this->wpdb->prefix}woocommerce_bundled_items
	                        WHERE bundle_id=%d AND product_id=%d
	                        ",
								$bundle_id,
								$product_id
							)
						);

						$this->wpdb->insert(
							$this->wpdb->prefix . 'woocommerce_bundled_items',
							[
								'product_id' => $translated_product_id,
								'bundle_id'  => $translated_bundle_id,
								'menu_order' => $menu_order,
							]
						);
						$translated_item_id = $this->wpdb->insert_id;
						$this->set_translated_item_id_relationship( $item_id, $translated_item_id, $lang );
					}

and ADD this below:

					$check = $this->wpdb->get_var(
						$this->wpdb->prepare(
							"SELECT bundled_item_id FROM {$this->wpdb->prefix}woocommerce_bundled_items 
             WHERE bundled_item_id = %d AND bundle_id = %d",
							$translated_bundle_id,
							$translated_product_id
						)
					);
					if ( !$check ) {
						$menu_order = $this->wpdb->get_var(
							$this->wpdb->prepare(
								" 
                            SELECT menu_order FROM {$this->wpdb->prefix}woocommerce_bundled_items
	                        WHERE bundle_id=%d AND product_id=%d
	                        ",
								$bundle_id,
								$product_id
							)
						);

						$this->wpdb->insert(
							$this->wpdb->prefix . 'woocommerce_bundled_items',
							[
								'bundled_item_id' => $translated_item_id,
								'product_id' => $translated_product_id,
								'bundle_id'  => $translated_bundle_id,
								'menu_order' => $menu_order,
							]
						);
					}

After that, you can go to the Products tab, filter the Bundles and Bulk update them without making any changes. That should solve the issue.