WPML
סטטוס
נפתר על ידי המפתח
נפתר בגרסה
Customer Reviews for WooCommerce 5.91.0
תוסף/ערכת עיצוב קשורים
Customer Reviews for WooCommerce
תגיות נושא
Compatibility

סקירה כללית של התקלה

בעת שימוש בתוסף Customer Reviews for WooCommerce והגדרת WPML עבור דומיין שונה לכל שפה, תוכן האימייל אינו מתורגם כראוי עבור שפות עם קודי שפה באותיות רישיות (לדוגמה, “SW”).

פתרון עוקף

ודא שיש לך גיבוי מלא של האתר לפני שתמשיך.


  • פתח את הקובץ …/wp-content/plugins/customer-reviews-woocommerce/templates/email.php.

  • החלף את הקוד הזה:
    	//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 ) ) );

  • בקוד הבא:
    	//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 );
    		}

כל התקלות הידועות →