I'm trying to find something, but unfortunately can not find it.

I have in my admin allow the setting so that when a product just have 0 stock can be ordered.

Does anyone know if it's possible with custom coding to ensure that a category can be excluded from this setting?