WPML
Estado
Resuelto por el autor
Resuelto en
Customer Reviews for WooCommerce 5.91.0
Plugin/tema relacionado
Customer Reviews for WooCommerce
Etiquetas de temática
Compatibility

Resumen del problema

Al utilizar el plugin Customer Reviews for WooCommerce y configurar WPML para Un dominio diferente por idioma, el contenido del correo electrónico no se traduce correctamente para los idiomas con códigos de idioma en mayúsculas (por ejemplo, «SW»).

Solución alternativa

Por favor, asegúrese de tener una copia de seguridad completa de su sitio antes de continuar.


  • Abra el archivo …/wp-content/plugins/customer-reviews-woocommerce/templates/email.php.

  • Reemplace 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 );
    		}

Todos los problemas conocidos →