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.
This topic is split from https://wpml.org/forums/topic/split-product-images-missing/
This topic contains 6 replies, has 0 voices.
Last updated by 10 months, 1 week ago.
Assisted by: Lucas Vidal de Andrade.