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 thread is resolved. Here is a description of the problem and solution.

Problem:
I use the plugin "WooCommerce Sendinblue newsletter subscription" in order to have an newsletter opt-in checkbox on the WooCommerce checkout page.
I'm trying to make this checkbox language-wise, i.e. adapt the checkbox label and set the right subscription list.

Solution:
It seems that there's a compatibility issue between the plugin and WPML. The Sendinblue plugin's settings are loaded and stored too early. In this case, can you follow these steps and try again to add the translation, please?

  • go to wp-content/plugins/woocommerce-sendinblue-newsletter-subscription/;
  • open the woocommerce-sendinblue.php file;
  • replace this line
    'label' => esc_attr($this->customizations['ws_opt_field_label']),
    

    with this one:

    'label' => esc_attr(apply_filters( 'wpml_translate_single_string', $this->customizations['ws_opt_field_label'], 'admin_texts_wc_sendinblue_settings', '[wc_sendinblue_settings]ws_opt_field_label')),
    

This topic contains 6 replies, has 2 voices.

Last updated by rubenM-27 2 months, 1 week ago.

Assigned support staff: Radu.

Author Posts
August 8, 2019 at 2:28 pm #4363775

rubenM-27

Hi there!

Since I wasn't able to re-open this recently closed topic due to my absence (wpml.org/forums/topic/woocommerce-sendinblue-translated-custom-fields-not-updating/), I open this new one.

I put the website on a minimal environment and the issue still persists.

You can access the website and install duplicator packages or whatever (it is a test version). See my previous topic for the credentials.

August 9, 2019 at 8:47 am #4368803

Radu
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hey Ruben,

As you can see here https://wpml.org/documentation/plugins-compatibility/, the WooCommerce Sendinblue Newsletter Subscription plugin is not fully compatible with WPML so there might be some issues when using these two together.

I had a look at the settings of the plugin here hidden link but I could see that the text from the Opt-In Field Label is different than the one displayed on the checkout page. Should I be looking at a different field? I'm not familiar with the plugin and I want to make sure that I'm checking the right option.

Thanks,
Radu

August 9, 2019 at 12:11 pm #4370121

rubenM-27

Hi Radu, thanks for your reply.

I know the plugin isn't compatible, I thought I could fix this with the custom XML config (or at least translate the desired fields).

The Opt-In Field Label is the correct field but depending on your profile language (I assume you use english), it displays differently. If you update it, it'll be updated in all languages, though. You can give a try in english and find it after in the string translation module.

Thanks,

Ruben

August 13, 2019 at 11:29 am #4387393

Radu
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hey Ruben,

Can you deactivate the cache module and the plugin for a little, please? I'm asking this because the XML code you added is correct but the values that are in Dashboard → WPML → String translation are not the right ones. However, if you look here hidden link under wc_sendinblue_settings, the value for ws_opt_field_label is the right one. There might be a caching issue here that is not letting the string translation dashboard get the right value. Can you do this change and give me a message back once you did it, please?

Thanks,
Radu

August 13, 2019 at 12:01 pm #4387727

rubenM-27

Hi Radu,
I disabled the caching system (WP-Rocket) and the issue still persists.
Please fell free to do this kind of change yourself. It's a test version 😉
Thanks
Ruben

August 15, 2019 at 12:08 pm #4400719

Radu
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hey Ruben,

It seems that there's a compatibility issue between the plugin and WPML. The Sendinblue plugin's settings are loaded and stored too early. In this case, can you follow these steps and try again to ad the translation, please?

  • go to wp-content/plugins/woocommerce-sendinblue-newsletter-subscription/;
  • open the woocommerce-sendinblue.php file;
  • replace this line
    'label' => esc_attr($this->customizations['ws_opt_field_label']),
    

    with this one:

    'label' => esc_attr(apply_filters( 'wpml_translate_single_string', $this->customizations['ws_opt_field_label'], 'admin_texts_wc_sendinblue_settings', '[wc_sendinblue_settings]ws_opt_field_label')),
    

Thanks,
Radu

August 15, 2019 at 4:40 pm #4402461

rubenM-27

Ok that made the trick.

I had to adapt it for the second field (ws_sendinblue_list) in the same php file.

Good to know that that filter can be used anywhere in the php files of any plugin.

Thanks for your support.

Ruben