WooCommerce custom snippet

I have a product category called “Used golf balls” and I want a text called “per dozen” at the end of price text for all the products under that category. I have prepared a custom snippet that adds that text after price text but it adds to all the products. But I need it to add to the products have that category.