martinH-133
so the english slug won't get translated in the menu
Dražen
Supporter
Languages:
English (English )
Timezone:
Europe/Zagreb (GMT+02:00)
Hello,
I have escalated the case to our compatibility team, as I have been able to reproduce it on clean sanbdox.
They will check further and confirm this bug, and provide if possible workaround for you.
I will update you soon.
Regards,
Drazen
martinH-133
Hello,
just to add to that issue, the sitemaps that are provided by rankmath are also using the wrong slug.
Dražen
Supporter
Languages:
English (English )
Timezone:
Europe/Zagreb (GMT+02:00)
Hello,
thanks for sharing this.
I will update you when I have more news.
Regards,
Drazen
Dražen
Supporter
Languages:
English (English )
Timezone:
Europe/Zagreb (GMT+02:00)
Hello,
we will be checking for permanent fix, but in the meantime, you can use the next workaround:
- Open the wp-content\plugins\seo-by-rank-math\includes\modules\woocommerce\class-permalink-watcher.php file
- On Permalink_Watcher::term_link(), around line 124, replace the following snippet:
$permalink_structure = wc_get_permalink_structure();
$category_base = trailingslashit( $permalink_structure['category_rewrite_slug'] );
$is_language_switcher = ( class_exists( 'Sitepress' ) && strpos( $link, 'lang=' ) );
With:
$permalink_structure = wc_get_permalink_structure();
// WPML Workaround for compsupp-6895
if ( class_exists('Sitepress') ) {
$args = array('element_id' => $term->term_id, 'element_type' => $taxonomy );
$term_language_info = apply_filters( 'wpml_element_language_details', null, $args );
$permalink_structure['category_rewrite_slug'] = apply_filters('wpml_translate_single_string', $permalink_structure['category_rewrite_slug'], 'WordPress', 'URL '.$taxonomy.' tax slug', $term_language_info->language_code );
}
$category_base = trailingslashit( $permalink_structure['category_rewrite_slug'] );
$is_language_switcher = ( class_exists( 'Sitepress' ) && strpos( $link, 'lang=' ) );
Regards,
Drazen
martinH-133
To keep this open, (cleanup robot was messaging me),
There still is a permanent fix missing
Dražen
Supporter
Languages:
English (English )
Timezone:
Europe/Zagreb (GMT+02:00)
Hello,
I will mark this as Escalated to the Compatibility team, and update you when there is a permanent fix released in our versions. In the meantime you can use suggested workaround fix.
Regards,
Drazen