Get product Category

global $post;
$terms = get_the_terms( $post->ID, 'product_cat' );
foreach ($terms as $term) {
    $product_cat_id = $term->term_id;
    break;
}

Author: Wojciech Borowicz

I hope this post will help you to do what you need.
In case you want some assistance click here to get in touch 

check out other blog posts