WooCommerce officially recommends the Code Snippets plugin for managing small functions of PHP code.
These small pieces of code override WooCommerce default behavious, theme behaviors, or in some cases plugin behaviors using WordPress hooks (actions and filters). You can also use it for CSS and JS code with the help of some PHP hooks.
There are many benefits of using Code Snippets in leiu of custom plugins, parent theme, or child theme. The biggest benefit that comes to mind is the ability to avoid creating a child theme – so you can use a box stock parent theme like Storefront without having to extend it.
All you need to fully customize a WooCommerce site are Code Snippets, settings, CSS modifications inside the Customizer and well chosen plugins.
While it’s great to minimize our use of custom code files with Code Snippets, I acknowledge there are many cases where custom code does need to be maintained under version control.
One such example is how popular managed WordPress hosting services commonly place the entire site under version control to manage environment phasing, upstreams, and releases in their workflows.