Help with with my function for wordpress

You can check if the get_field() comes up empty by doing

if ( get_field('pack_quantity') ) {
     //Your code
}

So something like this should work if you just need to check one of the fields.

add_action( 'woocommerce_single_product_summary', 'my_custom_fuction');

function my_custom_fuction() {

    if ( get_field('pack_quantity') ) { //Change this for which one you need to check
        echo 'Pack Quantity: ' . get_field('pack_quantity');
        echo''; 
        echo 'items per: ' . get_field('per_pack');
    }
}

https://www.advancedcustomfields.com/resources/hiding-empty-fields/