WooCommerce ‘Featured product’. How can I change it programmatically? [closed]

Want to improve this question? Update the question so it’s on-topic for WordPress Development Stack Exchange.

Closed 4 days ago.

I’m trying to set the ‘featured product‘ field via php programming to true, but I can’t find any examples of how to do it. I would also like to know in which field and table it is recorded.

Thanks.
Miquel.