- Status
- Resolvido pelo autor
- Resolvido em
- Customer Reviews for WooCommerce 5.91.0
- Plugin/tema relacionado
- Customer Reviews for WooCommerce
- Tags de tópico
- Compatibility
Visão geral do problema
Ao utilizar o plugin Customer Reviews for WooCommerce e configurar o WPML para Um domínio diferente por idioma, o conteúdo do e-mail não é traduzido corretamente para idiomas com códigos de idioma em maiúsculas (por exemplo, “SW”).
Solução alternativa
Certifique-se de ter um backup completo do seu site antes de prosseguir.
- Abra o arquivo …/wp-content/plugins/customer-reviews-woocommerce/templates/email.php.
- Substitua este código:
//WPML and Polylang integration if ( has_filter( 'wpml_translate_single_string' ) && defined( 'ICL_LANGUAGE_CODE' ) && ICL_LANGUAGE_CODE && !function_exists( 'pll_current_language' ) && $ivole_language === 'WPML' ) { $wpml_current_language = strtolower( $lang ); echo wpautop( wp_kses_post( apply_filters( 'wpml_translate_single_string', get_option( 'ivole_email_body', $def_body ), 'ivole', 'ivole_email_body', $wpml_current_language ) ) ); - Por:
//WPML and Polylang integration if ( has_filter( 'wpml_translate_single_string' ) && defined( 'ICL_LANGUAGE_CODE' ) && ICL_LANGUAGE_CODE && !function_exists( 'pll_current_language' ) && $ivole_language === 'WPML' ) { global $sitepress; $wpmllangs = $sitepress->get_active_languages(); if (ctype_upper($lang) && (ctype_upper($wpmllangs[$lang]["code"]))){ $wpml_current_language = ( $lang ); } else { $wpml_current_language = strtolower( $lang ); }