Plugin WooCommerce: Translate Product URLs
By default, Weglot doesn't allow you to translate product URL, you can do it following this
Enter the following code in your functions.php file. Then you will be able to edit the slug of your products directly in the WordPress backend, on the bottom of the product page.
1
<?php
2
3
add_filter('weglot_url_translate_metabox_post_type_exclude', 'active_metabox_translate_url');
4
function active_metabox_translate_url($excluded){
5
$index = array_search('product', $excluded);
6
if($index < 0){
7
return $excluded;
8
}
9
10
unset($excluded[$index]);
11
return $excluded;
12
}
Copied!
Last modified 2yr ago
Copy link