WPML
상태
개발자가 해결함
해결된 버전
WCFM Membership 2.11.8
관련 플러그인/테마
WCFM - WooCommerce Multivendor Membership
주제 태그
Compatibility

문제 개요

WCFM – Multivendor Marketplace for WooCommerce와 해당 애드온인 WooCommerce Multivendor Membership을 사용할 때, 기본 언어가 RTL(오른쪽에서 왼쪽)인 경우 보조 언어로 전송되는 인증 코드 이메일이 RTL 정렬을 상속합니다. 이는 보조 언어가 LTR(왼쪽에서 오른쪽)인 경우에도 발생합니다.

임시 해결 방법

진행하기 전에 사이트의 전체 사이트 백업을 완료했는지 확인하세요.


  • …/wp-content/plugins/wc-multivendor-membership/views/emails/email-verification.php를 여세요.

  • 16번째 줄을 찾으세요.

  • 다음 코드를:
    do_action( 'woocommerce_email_header', $email_heading, $email );
    ?>


  • 다음과 같이 교체하세요:
    // Workaround for compsupp-7719
    // Switch language context
    if( apply_filters( 'wcfm_allow_wpml_email_translation', true ) ) {
    	do_action('wpml_switch_language_for_email', $user_email);
    }
    
    ?>
    <!DOCTYPE html>
    <html <?php language_attributes(); ?>>
    	<head>
    		<meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo( 'charset' ); ?>" />
    		<meta content="width=device-width, initial-scale=1.0" name="viewport">
    		<title><?php echo get_bloginfo( 'name', 'display' ); ?></title>
    	</head>
    	<body <?php echo is_rtl() ? 'rightmargin' : 'leftmargin'; ?>="0" marginwidth="0" topmargin="0" marginheight="0" offset="0">
    		<table width="100%" id="outer_wrapper">
    			<tr>
    				<td><!-- Deliberately empty to support consistent sizing and layout across multiple email clients. --></td>
    				<td width="600">
    					<div id="wrapper" dir="<?php echo is_rtl() ? 'rtl' : 'ltr'; ?>">
    						<table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%">
    							<tr>
    								<td align="center" valign="top">
    									<div id="template_header_image">
    										<?php
    										$img = get_option( 'woocommerce_email_header_image' );
    
    										if ( $img ) {
    											echo '<p style="margin-top:0;"><img src="' . esc_url( $img ) . '" alt="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" /></p>';
    										}
    										?>
    									</div>
    									<table border="0" cellpadding="0" cellspacing="0" width="100%" id="template_container">
    										<tr>
    											<td align="center" valign="top">
    												<!-- Header -->
    												<table border="0" cellpadding="0" cellspacing="0" width="100%" id="template_header">
    													<tr>
    														<td id="header_wrapper" >
    															<h1 style="text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>"><?php echo esc_html( $email_heading ); ?></h1>
    														</td>
    													</tr>
    												</table>
    												<!-- End Header -->
    											</td>
    										</tr>
    										<tr>
    											<td align="center" valign="top">
    												<!-- Body -->
    												<table border="0" cellpadding="0" cellspacing="0" width="100%" id="template_body">
    													<tr>
    														<td valign="top" id="body_content">
    															<!-- Content -->
    															<table border="0" cellpadding="20" cellspacing="0" width="100%">
    																<tr>
    																	<td valign="top">
    																		<div id="body_content_inner" style="text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>">
  • 그리고 파일 끝(88번째 줄 부근)에 다음 코드를 추가하세요.
    <?php
    // switch language back
    	if( apply_filters( 'wcfm_allow_wpml_email_translation', true ) ) {
    		do_action('wpml_restore_language_from_email');
    	}
    ?>

알려진 모든 문제 →