Problems with WooCommerce + WPML emails
-
Hello there,
We are experiencing issues with translating the WooCommerce email notifications since we started using the plugin, and we were able to fix it with custom code:function add_wpml_filters() {
// Check if WPML is active and the required function exists
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
if (
is_plugin_active( 'sitepress-multilingual-cms/sitepress.php' ) &&
function_exists( 'wpml_st_load_admin_texts' )
) {
// Make sure admin texts are loaded
wpml_st_load_admin_texts();
// Check if the icl_st_translate_admin_string function exists
if ( function_exists( 'icl_st_translate_admin_string' ) ) {
$option_keys = [
'kt_woomail',
'woocommerce_email_footer_text'
];
foreach ( $option_keys as $option_key ) {
add_filter( 'option_' . $option_key, 'icl_st_translate_admin_string' );
}
} else {
// Fallback if icl_st_translate_admin_string is not available
error_log( 'WPML String Translation function icl_st_translate_admin_string is not available.' );
}
}
}
add_action( 'wp_loaded', 'add_wpml_filters', 20 );The problem is that WPML has removed the icl_st_translate_admin_string function in the latest update.
What would be the solution to fully translate the WooCommerce email notifications using the Kadence WooCommerce Email Designer plugin?
Thank you in advance.The page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Problems with WooCommerce + WPML emails’ is closed to new replies.