I want hide view more button if price is blank

Instead of eliminating the loop/add-to-cart.php template all together, why not hook into the price html Woocommerce hooks?

/*
 * Remove price HTML if stock is null
 *
 * Sources:
 * http://woocommerce.wp-a2z.org/oik_api/wc_productget_stock_quantity/
 */
add_filter( "woocommerce_get_price_html", "wphelpsanjay_remove_price_if_no_stock", 10, 2 );
add_filter( "woocommerce_variable_price_html", "wphelpsanjay_remove_price_if_no_stock", 10, 2 );

function wphelpsanjay_remove_price_if_no_stock( $price, $product ) {
    if ( null === $product->get_stock_quantity()) {
        return "";
    }
    return $price;
}