Skip to content Skip to sidebar

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

Problem:
The client was experiencing issues with Yoast SEO displaying raw keys instead of proper titles on Finnish product pages, brands not appearing on automatically translated product pages, and SUMO Reward Points messages displaying as raw keys on Finnish pages.

Solution:
1. To address the Yoast SEO issue, we recommended deactivating WPML Multilingual CMS and WPML SEO, then clearing the cache and ensuring the correct tags are added to Yoast.
2. For the SUMO Reward Points, we provided a custom filter to translate the messages based on the language:

add_filter( 'option_rs_message_for_single_product_point_rule', function( $value ) {<br />    if ( $value === 'rs_message_for_single_Tuote_point_rule' || empty( $value ) ) {<br />        return defined( 'ICL_LANGUAGE_CODE' ) && ICL_LANGUAGE_CODE === 'en'<br />            ? 'Buy this product and earn [rewardpoints] points ([equalamount])'<br />            : 'Osta tämä tuote ja ansaitse [rewardpoints] pistettä ([equalamount])';<br />    }<br />    return $value;<br />}, 999 );

3. For the brand issue, a one-time script was used to sync brands across translations:

add_action( 'admin_init', function() {<br />    if ( ! current_user_can( 'manage_options' ) ) {<br />        return;<br />    }<br />    $products = get_posts( array(<br />        'post_type'      => 'product',<br />        'posts_per_page' => -1,<br />        'post_status'    => 'any',<br />        'fields'         => 'ids',<br />    ) );<br />    if ( empty( $products ) ) {<br />        return;<br />    }<br />    foreach ( $products as $product_id ) {<br />        $brands = wp_get_object_terms( $product_id, 'product_brand', array(<br />            'fields' => 'ids',<br />        ) );<br />        if ( empty( $brands ) || is_wp_error( $brands ) ) {<br />            continue;<br />        }<br />        $trid = apply_filters( 'wpml_element_trid', null, $product_id, 'post_product' );<br />        if ( ! $trid ) {<br />            continue;<br />        }<br />        $translations = apply_filters( 'wpml_get_element_translations', null, $trid, 'post_product' );<br />        if ( empty( $translations ) ) {<br />            continue;<br />        }<br />        foreach ( $translations as $translation ) {<br />            if ( (int) $translation->element_id === (int) $product_id ) {<br />                continue;<br />            }<br />            wp_set_object_terms(<br />                $translation->element_id,<br />                $brands,<br />                'product_brand',<br />                false<br />            );<br />        }<br />    }<br />    update_option( 'rs_brand_sync_done', time() );<br />} );

If this solution does not resolve your issue or seems outdated, 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 the problem persists, 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 9 replies, has 0 voices.

Last updated by juhoA 2 weeks, 4 days ago.

Assisted by: Carlos Rojas.

Author Posts
May 12, 2026 at 12:52 pm

juhoA

1. Yoast is broken in finnish, Finnish is the original language, but for some reason it shows [wpseo_titles]title-Tuote in finnsih product pages, in english it works. I have tried to change database, but nothing works.
2. Brand doesn't come when product is translated automatically.
3. SUMO Reward Points message in product pages and checkout looks like this: rs_message_for_single_Tuote_point_rule, but only in finnish pages

May 13, 2026 at 11:06 am #18032637

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

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

Hello,
My name is Carlos, and I will continue working on this ticket

I kindly ask you to share the access credentials to the site again in your next message, which I have set private. The previous credentials shared were automatically deleted for security reasons.

Looking forward to your message.

May 13, 2026 at 1:07 pm #18033304

juhoA

Did you get those credentials?

May 13, 2026 at 5:46 pm #18034141

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

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

Hi there,
Yes, I got the credentials.

1.- The brand image in hidden link wasn't shown because the product in English was translated manually, and the Taom brand wasn't selected.

There are still 37 untranslated brands that can be translated here: hidden link or here: hidden link

2.- To solve the problem of the Yoast shortcode you need to edit the product in the original language (keep in mind that WPML doesn't touch the original language, so this is not a translation issue) and remove the shortocde from the SEO title, for example: Edit the product in Finnish: hidden link -> Scroll to the Yoast SEO section -> 'SEO title' field -> Remove the shortcode ([wpseo_titles]) -> Save the changes

You must also remove the shortcode from hidden link

3.- I need you to describe how to set the SUMO Reward Points in that position so I can have a better understanding of how it works and then find how to correctly show it. In any case, I recommend that you contact the SUMO Reward Points support service and ask them why it is not appearing correctly in the default language of the site.

If you deactivate the WPML plugins, does the problem with the SUMO Reward Points still appear?

Looking forward to your message.

May 13, 2026 at 7:58 pm #18034374

juhoA

I deactivated wpml cms and wpnl seo before and everything worked, Yoast and Sumo. Why the brands don't work with automated translation.

May 14, 2026 at 10:06 am #18035331

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

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

Hi,

To automatically translate the Brands, the best option is to create a test product -> Assign all the brands -> Automatically translate the test product, and then delete the test product and its translation.

May 18, 2026 at 1:09 pm #18043157

juhoA

I translated all brands, created a test product. Test product is working with brands, but most products doesn't have brand image or taxonomy.

That Yoast problem still exists, everytime I change this: [wpseo_titles]title-Tuote to this: %%title%% %%page%% %%sep%% %%sitename%% it changes back to that shortcode after refresh. It works when I deactivate wpml and wpml seo. Same thing with SUMO it works when wpml deactivated.

I don't want to go through 1000 products to add that yoast and brand to every single one.

May 19, 2026 at 7:39 am #18044689

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

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

Hi there,

1.- Regarding the brand images or taxonomy: are you referring to products in the original language or translated products? Can you share a URL where the issue can be seen?

If you bulk update these products, does the issue disappear?

2.- Please remove the shortcodes from the main Yoast configuration for products: hidden link and check if the issue has disappeared.

May 21, 2026 at 9:53 am #18051013

juhoA

Yoast problem solved by removing that shortcode, but it only works if it is empty. If I add any tag it changes back to shortcode.

I was also able to fix that SUMo problem with the help of AI. I added this translation:
add_filter( 'option_rs_message_for_single_product_point_rule', function( $value ) {
if ( $value === 'rs_message_for_single_Tuote_point_rule' || empty( $value ) ) {
return defined( 'ICL_LANGUAGE_CODE' ) && ICL_LANGUAGE_CODE === 'en'
? 'Buy this product and earn [rewardpoints] points ([equalamount])'
: 'Osta tämä tuote ja ansaitse [rewardpoints] pistettä ([equalamount])';
}
return $value;
}, 999 );

add_filter( 'option_rs_purchase_reward_message_single_product_guest', function( $value ) {
if ( $value === 'rs_purchase_reward_message_single_Tuote_guest' || empty( $value ) ) {
return defined( 'ICL_LANGUAGE_CODE' ) && ICL_LANGUAGE_CODE === 'en'
? 'Buy this product and earn [rewardpoints] points ([equalamount])'
: 'Osta tämä tuote ja ansaitse [rewardpoints] pistettä ([equalamount])';
}
return $value;
}, 999 );

add_filter( 'option_rs_total_earned_point_caption_checkout', function( $value ) {
if ( $value === 'rs_Yhteensä_earned_point_caption_checkout' || empty( $value ) ) {
return defined( 'ICL_LANGUAGE_CODE' ) && ICL_LANGUAGE_CODE === 'en'
? 'Total earned points'
: 'Ansaitut pisteet yhteensä';
}
return $value;
}, 999 );

add_filter( 'option_rs_total_earned_point_caption', function( $value ) {
if ( $value === 'rs_Yhteensä_earned_point_caption' || empty( $value ) ) {
return defined( 'ICL_LANGUAGE_CODE' ) && ICL_LANGUAGE_CODE === 'en'
? 'Total earned points'
: 'Ansaitut pisteet yhteensä';
}
return $value;
}, 999 );

Also fixed brands with one time snippet:
add_action( 'admin_init', function() {

if ( ! current_user_can( 'manage_options' ) ) {
return;
}

$products = get_posts( array(
'post_type' => 'product',
'posts_per_page' => -1,
'post_status' => 'any',
'fields' => 'ids',
) );

if ( empty( $products ) ) {
return;
}

foreach ( $products as $product_id ) {

// Get Finnish/original brands
$brands = wp_get_object_terms( $product_id, 'product_brand', array(
'fields' => 'ids',
) );

if ( empty( $brands ) || is_wp_error( $brands ) ) {
continue;
}

// Get WPML translations
$trid = apply_filters( 'wpml_element_trid', null, $product_id, 'post_product' );

if ( ! $trid ) {
continue;
}

$translations = apply_filters( 'wpml_get_element_translations', null, $trid, 'post_product' );

if ( empty( $translations ) ) {
continue;
}

foreach ( $translations as $translation ) {

if ( (int) $translation->element_id === (int) $product_id ) {
continue;
}

wp_set_object_terms(
$translation->element_id,
$brands,
'product_brand',
false
);
}
}

update_option( 'rs_brand_sync_done', time() );

} );

May 21, 2026 at 10:02 am #18051053

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

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

Hi there,

I'm happy to hear that you find a solution for the problem with Yoast.

May 21, 2026 at 12:13 pm #18051514

juhoA

Great help and got some solutions.