[Resolved] translate MailPoet to enable customers sentence
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.
[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
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.
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.
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
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.
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.