How to get current product category ID in product archive page

I solve This To get the current category ID.

$cate = get_queried_object();
$cateID = $cate->term_id;
echo $cateID;

and it works like a charm.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)