When customizing an existing theme, you can create a child theme so that general updates to the theme do not overwrite your modifications.

Sometimes it may be simpler and preferable to create a plugin rather than modify the existing theme code. The advantage of writing a plugin is that the client can change the theme and the plugin will still work. There is also the possibility that there may already be an existing child theme in use for the parent theme.

When modifying plugins it may be necessary to actually overwrite the plugin source code if customization methods such as those provided by a plugin like woocommerce are not available. The obvious disadvantage when making these types of changes is that you can no longer update the plugin without overwriting your modifications. At that point it’s a good idea wait until it’s absolutely necessary to update the plugin. For example, when a plugin is no longer compatible with the current version of WordPress.

This brings up another issue regarding WordPress core updates. You need to be careful when updating WordPress itself as bugs can often crop up relating to customized or third party themes and plugins. It is best if you have a version of your website running on a local or staging server where you can test out updates before performing them on a live server. It can be costly if you constantly have to address bugs in themes and plugins due to updates. You may want to limit the amount of updates to once a year or even longer if your website is running fast and stable.