Neither of the above methods worked for me. I have an unsupported theme, so WC is helpfully enabling the gallery options for me. A review of the WC code showed that the function where they are being enabled is called on the
template_redirect hook at default priority.
So I tried this and it works: