I have a problem with categories and subcategories in the Wordpress plugin - Woocommerce. I am creating a script that will create categories and subcategories, the problem is that I do not quite understand how it all works in the Woocommerce database structure.
What could I do:
in "wp_terms":
term_id | name | slug | term group 20 | Parent category | parent | 0 21 | Children category | children | 0
in "wp_term_taxonomy":
term_taxonomy_id | term_id | taxonomy | description | parent | count 1 | 20 | product_cat | | 0 | 0 2 | 21 | product_cat | | 20 | 0
And it works, but why the hell do not:
in "wp_term_taxonomy":
term_taxonomy_id | term_id | taxonomy | description | parent | count 1 | 20 | product_cat | | 21 | 0 2 | 21 | product_cat | | 0 | 0
Any conclusions?
Thanks so much for everyone in advance. :)
source share