You can test if a post has a particular term assigned to it with the has_term
function.
E.g.
if ( has_term( 'term-slug', 'taxonomy-slug' ) ) {
// do stuff
}
With this you can test if your “post” has a particular “term” ( aka if your “product
” has a particular “product_cat
” )