This thread is resolved. Here is a description of the problem and solution.
Problem:
The client is developing a plugin that adds custom emails to WooCommerce and is using WPML to send emails in the current user's language. While the text within the email translates correctly, the WooCommerce email footer, which is an option fetched by a hook, does not translate as expected.
Solution:
We recommend following our documentation on sending emails with WPML, which provides guidance on correctly implementing email translations via WPML/WCML. If you're triggering the email from custom code, you should use the WPML hooks provided in the documentation:
Additionally, to ensure the translation of admin options in the backend, you should use the
wpml_st_force_translate_admin_options
hook when needed. This hook forces the translation of admin texts and can be implemented as follows:
do_action( 'wpml_st_force_translate_admin_options' );
Please note that the solution provided might be irrelevant if it's outdated or not applicable to your case. If the issue persists, 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 you still need assistance, please open a new support ticket with us.
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.
This topic contains 19 replies, has 2 voices.
Last updated by 1 year, 5 months ago.
Assisted by: Dražen.