Skip to content

Third Party Module Layout Override – use custom module or within theme directory

When overriding a layout xml file from a third-party module, example being Amasty, is it best to include the new xml file within a custom module, within app/code, or within the theme directory, that is in app/design?

I have been performing these overrides within a custom module but everything I have been reading recommends placing the new layout xml within the theme directory.

Why is one option better than the other?