很晚,但可能对新搜索有用:产品类型存储在wp\\U term\\U关系中。您可以在wp\\u terms表中找到名称“简单、分组、变量等”,并获取它们的term\\u id。
下面是一个SQL示例,我用来将所有已设置为变量(10)的产品设置为简单(8):
UPDATE wp_term_relationships
LEFT JOIN wp_posts ON(wp_term_relationships.object_id = wp_posts.ID)
SET wp_term_relationships.term_taxonomy_id = 8
WHERE wp_posts.post_type = \'product\'
AND wp_term_relationships.term_taxonomy_id = 10