Protecting WooCommerce Customizations with Update

First and foremost you shouldn’t be modifying Woocommerce files directly. For that matter, it’s a bad idea for WordPress, themes, or plugins. Most plugins and themes provide a means to alter core functionality and appearance in update safe ways.

For Woocommerce some basic guidelines are here.

But in a nutshell, to modify appearance you would generally copy the pages or components to a subdirectory in your theme and modify those instead of the core Woocommerce files.

Woocommerce also supports many hooks, filters, and actions to modify functionality. At first glance, it looks as if you should be using the appropriate hook to modify Woocommerce to your liking.