Vulnerability Concern From the Plugin or From Not Updating the Plugin?

At our company we use a good handful of plugins, most notably WooCommerce. The way that we have things integrated, and the systems built around that, mean that doing wholesale updates are usually going to involve a lot of fixes and debugging. But, in eCommerce, staying up to date with security fixes is a MUST. To that end, we’ve implemented a system of using composer to install our plugins at a fixed version, and then used composer patches to ensure we can continue to port security fixes into our codebase.

See this blog post for a detailed explanation.

A simple guide would be:

  • Add composer-patches to your project
  • Configure your project to use either a list of patches, or a patch list file as detailed in the configuration section
  • Create some patches, we keep ours in a patches folder in the project root
  • Run composer install

You can also use remotely-hosted patches, but we prefer to keep all of ours local to the project.

This system allows us to keep up-to-date with security fixes, and possibly bring in bug fixes (or fix things ourselves) without having to go through the trouble of doing complete version upgrades and possibly spending days fixing things to work.