Saltar al contenido Saltar a la barra lateral

Open

Reported for: WPML Multilingual & Multicurrency for WooCommerce 5.3.7

Topic Tags: Compatibilidad, 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 respuestas a “HUSKY - Products Filter Professional for WooCommerce - Product Category Links Not Correctly Translated”

    • Hello,

      Please start a chat with us on our support forum so we can take a closer look. Your URLs may differ slightly, and in that case, the code might need to be adjusted accordingly.

Dejar una respuesta

Por favor, mantente en el tema y sé respetuoso con los demás. Si necesitas ayuda con problemas no relacionados con esta publicación, utiliza nuestro Foro de Soporte para iniciar un chat o enviar un ticket.

Puedes usar estas etiquetas:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>