- Trạng thái
- Đã được giải quyết bởi nhà phát triển
- Đã giải quyết trong
- Customer Reviews for WooCommerce 5.91.0
- Plugin/giao diện liên quan
- Customer Reviews for WooCommerce
- Thẻ chủ đề
- Compatibility
Tổng quan về lỗi
Khi sử dụng plugin Customer Reviews for WooCommerce và thiết lập WPML cho Một tên miền khác nhau cho mỗi ngôn ngữ, nội dung email không được dịch chính xác đối với các ngôn ngữ có mã ngôn ngữ viết hoa (ví dụ: “SW”).
Giải pháp tạm thời
Vui lòng đảm bảo có bản sao lưu toàn bộ trang web của bạn trước khi tiếp tục.
- Mở tệp …/wp-content/plugins/customer-reviews-woocommerce/templates/email.php.
- Thay thế mã này:
//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 ) ) ); - Bằng:
//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 ); }