I contacted WPML support, and they resolved my issue.
They said that this is because your code has an incompatibility in related products for secondary languages.
They made a change to the products.php file (inc/shortcodes/products.php). Exactly on line 234:
The code was this:
$args[‘post__in’] = array_merge( array( 0 ), wc_get_related_products( $product->get_id(), $args[‘posts_per_page’], $product->get_upsell_ids() ) );
Replaced for this:
$args[‘post__in’] = wc_get_related_products( $product->get_id());
By doing this my problem was solved, and related products appear in all languages. (see attached image)
But WPML support said that you should include this change in the woodmart theme in the next update, otherwise when you update it will replace the code and the error will happen again.
Attachments:
You must be
logged in to view attached files.