I might try something like this at first, just to see if you're getting into that code:
echo "<p>About to hit the if</p>";
if ( $product->get_price_html() ) :
echo "<p>Made it into the if</p>";
(Or error_log()
instead of echo
if you prefer?)
If neither shows up, then you at least know that you need to figure out why it's not getting there at all, whereas if only the first debug paragraph show, then the likely suspect is the get_price_html()
method.
PS: might be useful to add this while debugging:
<?php
ini_set('display_errors', true); // change to false or remove when you go live
error_reporting(E_ALL);
// rest of code...