You can call object
isable(), if you aren't in combat. This will disable events and hide the frame. This is on single frames.
headers are slightly worse to deal with however. You have to call RegisterAttributeDriver(header, 'state-visibility', nil) and probably header:Hide(). The registerattributedriver is only needed if you are using the visibility argument.
(sent from my phone)