Hello,
Try to delete the code and activate “Show Only Min Price On Variable Products” in Theme Options > WooCommerce > Shop > Product style.
Regards