Assign a category to a product if contains certain tags

Hi, everyone. I’m less than a beginner and I am trying to figure out this task. I have a WooCommerce website and this is the logic I need to apply:
IF product tags contains one of these tags (tags list)
THEN assign the product this MENU_CAT (which is a custom taxonomy).
Example: if the product tags contains ‘womanshirt’ or ‘shirt’ or ‘womanlongsleeves’ then menu_cat of such product should be ‘woman-t-shirt’.
I have several conditions like this that has to be applied and they all should be applied to all products so that anytime a new product is added it gets the correct menu_cat taxonomy.
Can anyone help me?

post some example of ur code. because i cant understand your question and what you are expecting answer

Thank you for getting back to me. I have no code, I didn’t even start to write it. I will explain with different words: in Products Tag I have several different tags; I need to create a new category for the products where every category name groups some specific tags. Is that more clear? Thanks

Sponsor our Newsletter | Privacy Policy | Terms of Service