[Resolved] Can't translate strings in mailchimp for Woocommerce
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is unable to translate the WooCommerce integration on the checkout page, even though it appears translated in WPML's String Translation. Solution: If you're experiencing this issue, we recommend you try the following steps: 1. Edit the
// Ensure translation here 3. Save the file. 4. Navigate to WPML -> String Translation. 5. Enable the "Auto register strings for translation" option. 6. Visit the checkout page in the default language. 7. Disable the option. 8. Search for the string in String Translation. 9. You should see it twice, please translate both strings. 10. Clear the cache and check the translated checkout page.
This solution might be irrelevant if it's outdated or not applicable to your case. 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 issue persists, please open a new support ticket at WPML support forum.
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.
Background of the issue:
WPML is supposed to be fully comptible with Mailchimp for Woocommerce and I did translate the form ok. I'm an however unable translate Woocommerce integration on checkout here. hidden link
it's translated ok in string translations. hidden link
Symptoms:
The Woocommerce integration on checkout is not translating, even though it is translated correctly in string translations.
Welcome to the WPML support forum. Before passing this thread to my colleague, I would like to share some suggestions and possible solutions for the issues you mentioned.
This may be because of the older version of the plugins. So please upgrade to the latest version of WPML, WooComemrce, and Elementor after a full site backup {mandatory}. Then clear all types of caches and make sure the bug exists or not.
If the problem remains, please visit WPML>>String Translation after a site backup and enable the *Look for strings while pages are rendered* option of *Auto register strings for translation* section(on the bottom of the screen). Then visit the frontend pages (Checkout) and check whether the issue exists or not.
This option will be disabled in a couple of hours automatically. But will help us to track the issue in similar cases. Refer to the following doc for more details.
I'm Osama from WPML forums support. I'll be glad to help you today.
I would need to look closely at your site, so I would need to request temporary access (WP-Admin and FTP) Preferably to a test site where the problem has been replicated.
Your answer will be private, meaning only you and I can access it.
❌ Please backup your database and website ❌
✙ I need your permission to deactivate and reactivate the plugins and themes and change site configurations. This is also why the backup is critical.
✙ I also need your permission to take a local copy of your site to debug the issue without affecting your live site.
Thanks for the access details. Please check the following steps:
1- Edit the "wp-content/plugins/mailchimp-for-wp/integrations/woocommerce/class-woocommerce.php" file
2- After line 186, add the following line (Kindly check the attached screenshot)
$label = __($label, 'mailchimp-for-wp'); // Ensure translation here
3- Save the file
4- Go to WPML-> String Translation
5- Enable the "Auto register strings for translation" option
6- Visit the checkout page in the default language
7- Disable the option
8- Search for the string in String Translation
9- You should see it twice, please translate both strings
10- Clear the cache and check the translated checkout page