Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is experiencing a 301 error (Too many redirects) when trying to view all translated products on their website. They are unsure if recent plugin updates could have caused this issue.
Solution:
We identified that the issue was related to the handling of taxonomy slugs for product categories. We recommended modifying the code to ensure that the slug for each product category is correctly decoded. Here is the code we suggested adding to the site's functions:

add_filter( 'get_term', function( $term, $taxonomy ) {    
if ( $taxonomy === 'product_cat' && isset( $term->slug ) ) {
       $term->slug = urldecode( $term->slug ); 
   }
return $term;
}, 10, 2 );

If this solution does not resolve your issue, or if it seems outdated or irrelevant to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. Additionally, you can open a new support ticket for further assistance at WPML support forum.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 2 replies, has 0 voices.

Last updated by Shekhar Bhandari 1 week, 2 days ago.

Assisted by: Shekhar Bhandari.

Author Posts
January 2, 2025 at 12:32 pm #16558815

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Since the issue is happening even without WPML, I would say it's a WooCommerce issue.

Thanks