דלג על הניווט

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>