We are using WP All Import to import product data from a CSV into WooCommerce. Everything works fine (great plugin!) but we have one problem:
Two of our product attributes contain disallowed symbols:
< 10 million views > 10 million views
Wordpress automatically removes the '<' and '>' symbols meaning that the second attribute is treated as a duplicate and therefore doesn't get imported.
WP All Import's developers suggest using the wp_insert_term_data hook to change the slugs as they're being inserted into the database.
This is a good idea as we would then be able to maintain both attributes. For example:
< 10 million views becomes lt-10-million-views > 10 million views becomes gt-10-million-views
I'm sure this is pretty simple, but I'm still a newbie when it comes to hooking into Wordpress! What's the best way to do this?
Thanks in advance for any help!