php add “hide” condition to an if statement

So I have this code that adds a custom field to my products in woocommerce:

add_action( 'woocommerce_single_product_summary', 'shoptimizer_custom_author_field', 3 );
function shoptimizer_custom_author_field() { ?>
<?php if(get_field('author')) { ?>
<div class="cg-author"><?php the_field('author'); ?></div>
<?php }
}

Now I would want to add a condition to the if-statement that says “if field is not empty, hide product title”.

The class for the product page product title seems to be “product_title”.

Will be fascinating how this will look like once It’s added into this piece of code above. I think it’s not a big deal, but my comprehension ends with HTML and CSS sadly.

With kind regards and thanks for your time and your reply

Chris