Get categories for variant products

A variant (child) product should not have categories. We need a new method to get product categories, either for a product or for a parent product if the parent is set.