Since 3.0 featured products are marked as featured by being given the featured
term that WooCommerce creates in the product_visibility
taxonomy.
But to tell if a product is featured, instead of checking the terms directly or using get_post_meta()
(which wouldn’t work anymore anyway), use the get_featured()
method of WC_Product
:
$product_id = 1;
$product = wc_get_product( $product_id );
$featured = $product->get_featured();