How To Check Which Category The Product Belongs To After We Process The Order


I am wondering how do I check which category the product belongs to after we process the order.

I am currently making a small modification on fn_order_notification and I am not sure how to check for the name of the category that the product belongs to. I am using cs-cart 4.2.

Any help is appreciated.