While working on a project to integrate Magento store to work with WooCommerce, one of the things to consider is the URL structure in WordPress that is different from Magneto. For example, the shop categories and tags will always have the “/shop/” in their slug.
I found that when you create a taxonomy and delete it, it’s not permanantly deleted and WordPress keeps the texonomy in the database. In any future case that you’ll need to create the same taxonomy term again, WordPress will create alternative url it will concatenate the taxonomy name to the url (taxonomy-name-category-name) and you will end up with Ugly url’s.
In order to solve it, the simple solution is to go to phpMyAdmin and to delete the old category slugs from the terms table in your DB. This post is a great step by step guide premaritally delete old taxonomies from your WordPress DB.
If you need to map your URL’s and and create URL redirects (changes in path, old products in your store, etc’), you should check the redirection plugin, this plugin will allow you to create redirects in WordPress admin or to import from .htaccess file in bulk.