I have a woocommerce store and I try to select from Mysql all products and set them as "Featured" products or set them as Non "Featured" products.
I have found the following query that set post_status to whatever I want. I quess that I just have to replace post_status to something else that set products as "featured" products or as no "featured" product.
UPDATE wp_posts
SET post_status = 'Published'
AND post_type = 'product'
OR post_type = 'product_variation'
2
Answers
Is there a reason you want to hack this into the MySQL database directly? The proper approach would be to use the WC API in order to do so.
An example that uses an array of WC products:
You can use following custom PHP code: