Find woocommerce product ID by custom field value?

$args = array(
    'post_type' => 'product',
    'meta_key' => 'YOUR_FIELD_ID',
    'meta_value' => array('yes'), //'meta_value' => array('yes'),
    'meta_compare' => 'IN' //'meta_compare' => 'NOT IN'
);
$products = wc_get_products($args);

foreach ($products as $product) {
//do your logic
}

tech