(a) Offense defined.--A person commits a misdemeanor of the third degree if he discloses, except to authorized persons for official governmental purposes, any tax information that is:
(1) designated as confidential by a statute or ordinance of a city of the second class; and
(2) obtained by him in conjunction with any declaration, return, audit, hearing or verification required or authorized by statute or ordinance.
(b) Exception.--Subsection (a) shall not apply where disclosure is required by law or by court order.
(c) Definition.--As used in this section, the term "person" includes, but is not limited to, a current or former officer or employee of the Commonwealth or any of its political subdivisions and any other individual who has access to confidential tax information.