WPML
상태
미해결
보고된 제품
WPML Multilingual CMS 4.5.14
관련 플러그인/테마
Jetpack
주제 태그
Compatibility

문제 개요

Jetpack을 사용하는 사이트에서 로그아웃한 경우, 보조 언어로 장바구니에 상품을 추가하려고 할 때마다 404 오류가 발생합니다.

임시 해결 방법

두 가지 임시 해결 방법이 있습니다. 진행하기 전에 반드시 웹사이트를 전체 백업하세요.

임시 해결 방법 1: Jetpack 편집


  1. …/wp-content/plugins/jetpack/modules/woocommerce-analytics/classes/class-jetpack-woocommerce-analytics-universal.php 파일을 여세요.

  2. 다음을:
    $referer_postid = isset( $_SERVER['HTTP_REFERER'] ) ? url_to_postid( esc_url_raw( wp_unslash( $_SERVER['HTTP_REFERER'] ) ) ) : 0;

    다음으로 변경하세요.

    $referer_postid = $_POST["add-to-cart"];

임시 해결 방법 2: WPML 편집


  1. …wp-content/plugins/wpml-string-translation/classes/slug-translation/RewriteRules/Hooks.php 파일을 여세요.

  2. 다음을:
    		if ( ! $this->cache ) {
    			$this->cache = $this->factory->create()->rewrite_rules_filter( $value );
    		}

    다음으로 변경하세요.

    //		if ( ! $this->cache ) {
    			$this->cache = $this->factory->create()->rewrite_rules_filter( $value );
    //		}

알려진 모든 문제 →