I think there is a misunderstanding here:
- The Group extension is just one kind of field (special one), it acts exactly like other field type like text
, file
, etc.
- The techniques to show/hide meta boxes are applied for meta boxes only, not for fields, so they're not applied to groups.
But you can do a tricky way like this to achieve what you want:
- Create a meta box
- In that meta box, define only 1 group and put all fields under this group
- Use techniques above to hide whole meta box
Because this meta box contains only 1 group, show/hide this meta box actually show/hide this group.
Hope that helps. If you need anything, please let me know.
Thanks