Adrian Emil Tudorache developer
Use this:
get_queried_object();
More info: https://stackoverflow.com/questions/12289169/how-to-get-the-current-taxonomy-term-id-not-the-slug-in-wordpress