How to get customfield value by woocommerce product ID

If you look for all products with same ‘product_cip’ value try this:

$a=array(
    'post_type'      => 'product',
    'post_status'    => 'publish',
    'posts_per_page' => - 1,
    'meta_query'     => array(
        array(
            'key'    => 'product_cip',
            'value'  => 'some value',
            'compare'=> '='
        )
    ),
    'fields' => 'ids'
);
$b=get_posts($a);
echo count($b);

if you have get all products data

$products_array=array();
foreach($b as $v){
    $_product=wc_get_product($v);
    echo $_product->get_name().',';
    $products_array[]=$_product;
}