Woocommerce change the price of products in the database
I’m trying to adjust the price of products in the database. I need to customize products that have custom taxonomy manufactory with id 270.
I can change a simple product with this code:
UPDATE wp_postmeta LEFT JOIN wp_term_relationships ON wp_term_relationships.object_id = wp_postmeta.post_id SET wp_postmeta.meta_value = wp_postmeta.meta_value*1.05 WHERE wp_postmeta.meta_key = "_regular_price" AND wp_term_relationships.term_taxonomy_id = "270"
But it won’t change prices for variable products … Can anyone help me?