탐색 건너뛰기

Open

Reported for: WooCommerce Multilingual & Multicurrency 5.3.7

Topic Tags: Compatibility, WCML

Overview of the issue

When using HUSKY – Products Filter Professional for WooCommerce with WPML, there is a known issue where product category links like the following are not correctly translated.

For example, translating http://www.domain.com/product-category/slug1/slug2/slug3, results into http://www.domain.com/?product_cat=slug3, instead of having: http://www.domain.com/en/product-category/slug1/slug2/slug3.
This issue results in URLs that do not resolve correctly in secondary languages, leading to 404 errors.

Workaround

Please, make sure of having a full site backup of your site before proceeding.

  • Add the following code to the theme’s functions.php file:
    // WPML Workaround for compsupp-7532
    function wpml_compsupp7532_add_custom_blacklist_requests( $blacklist, $sitepress ) {    
    	// Add your custom request to the blacklist array
    
      // We can hardcode URL's, like:
      // Add here your problematic URL's
      $blacklist[] = "category-product/slug1/slug2/slug3";
        
      return $blacklist;
    }
    
    add_filter( 'wpml_sl_blacklist_requests', 'wpml_compsupp7532_add_custom_blacklist_requests', 10, 2 );
    
  • Add a small modification to the block content.
  • You may need to re-translate the links.

2 응답 에게 “HUSKY - Products Filter Professional for WooCommerce - Product Category Links Not Correctly Translated”

답장을 남겨주세요

주제를 유지하고 다른 사람을 존중하십시오. 이 게시물과 관련 없는 문제에 대한 도움이 필요한 경우 지원 포럼을 사용하여 채팅을 시작하거나 티켓을 제출하십시오.

다음 태그를 사용할 수 있습니다.
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>