Skip Navigation

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

Problem: I'm having trouble translating the mailpoet plugin

Solution: Mailpoet is not officially compatible but you can try the following
1) Upgrade to the latest version of WPML
2) Go to *wp-content/plugins/mailpoet/lib/WooCommerce* folder
3) Open *Subscription.php* file for edit
4) Scroll down to line 48 and make the following change to the code. Save the change.

From

$labelString = $this->settings->get(self::OPTIN_MESSAGE_SETTING_NAME);

To

[php]
$labelString = __($this->settings->get(self::OPTIN_MESSAGE_SETTING_NAME), 'wpml-fix');
>String Translation enables "Look for strings while pages are rendered"
6) Visit the page in the front end
7) Then the string should appear in WPML>>String Translation under the text domain 'wpml-fix'
8) Translate it there and it should show up in the front end

Relevant Documentation:
https://wpml.org/plugin/mailpoet-3-new/

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

Last updated by arazS 4 years ago.

Assisted by: Bigul.

Author Posts
November 12, 2020 at 11:27 am #7433311

arazS

Hello,

I started to MailPoet for collecting subscribers and send newsletter emails. There is an option for MailPoet to enable customers to sign up to the newsletter in the checkout process. Customers can click following sentence "I would like to receive exclusive emails with discounts and product information". Please check screenshot 1.

November 13, 2020 at 7:26 pm #7445297

Bigul
Supporter

Languages: English (English )

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

Hello,

Welcome to the WPML support forum. I will do my best to help you to resolve the issue.

Please fill the private details fields after a full site backup. I would like to access the admin area of your site for further checking.

Please refer to the following links for more details about our private information sharing policies.

https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

hidden link

--
Thanks!

Bigul

November 14, 2020 at 6:25 pm #7448773

Bigul
Supporter

Languages: English (English )

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

Hi Araz,

Thank you for the login information. Please check the attached image. The fix is not applied to the MailPoet plugin yet. So please try the following steps after a full site backup and check the issue is existing or not.

1) Upgrade to the latest version of WPML(4.4.5 series)
2) Go to *wp-content/plugins/mailpoet/lib/WooCommerce* folder
3) Open *Subscription.php* file for edit
4) Scroll down to line 48 and make the following change to the code. Save the change.

From

$labelString = $this->settings->get(self::OPTIN_MESSAGE_SETTING_NAME);

To

$labelString = __($this->settings->get(self::OPTIN_MESSAGE_SETTING_NAME), 'wpml-fix');

5) After that, Go to WPML>>String Translation enables "Look for strings while pages are rendered"
6) Visit the page in the front end
7) Then the string should appear in WPML>>String Translation under the text domain 'wpml-fix'
8) Translate it there and it should show up in the front end

--
Thanks!

Bigul

2020-11-14_23-58-17.png
2020-11-14_23-46-27.png
November 17, 2020 at 7:07 am #7463167

arazS

Hi Bigul,

Thanks for your comments.

I already tried this method with your colleague but it didn't work. I repeated the steps you mentioned in your reply but wpml-fix doesn't show up when I search for it. Please find attached screenshots for both subscription.php and wpml settings. I also tried to scan the strings for Mailpoet but it didn't work too.

Regards,
Araz

Capture2.JPG
Capture.JPG
November 17, 2020 at 10:12 am #7464797

arazS

Bigul,

Now it worked. The string shows up under 'wpml fix'. Thanks for the solution.

Should I add this to the child theme or you will work with Mailpoet to fix this problem permanently?

November 17, 2020 at 2:36 pm #7467349

Bigul
Supporter

Languages: English (English )

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

Hi Araz,

Thank you for the feedback. Happy to know you are getting the expected result now.

Please note, *MailPoet* plugin is not included on the WPML official compatibility list for the Plugins - https://wpml.org/plugin/. It does not mean that this plugin is not compatible with WPML, but our compatibility team has not tested it yet.

Therefore it will be great if you can request the plugin author to apply for our Go Global Program. Please share the following URL with them. This procedure will help to make this plugin fully compatible with WPML.

https://wpml.org/documentation/theme-compatibility/go-global-program/

--
Thanks!

Bigul