// Remove product-category from URL add_filter('term_link', 'custom_remove_category_slug', 10, 3); function custom_remove_category_slug($url, $term, $taxonomy) { if ($taxonomy == 'product_cat') { return str_replace('/product-category', '', $url); } return $url; } // Rewrite rules add_action('init', 'custom_product_cat_rewrite_rules'); function custom_product_cat_rewrite_rules() { $terms = get_terms([ 'taxonomy' => 'product_cat', 'hide_empty' => false, ]); foreach ($terms as $term) { add_rewrite_rule( $term->slug . '/?$', 'index.php?product_cat=' . $term->slug, 'top' ); } }

...

[yith_wcwl_wishlist]