How to ‘clone’ a wp plugin to make small changes

The recommended way to alter the behaviour of WordPress core and WordPress plugins is to use the Plugin API. To use this API, you can create your own plugin containing code that uses action hooks and filter hooks to make the changes you want.

If you were to clone a plugin and edit the code directly, those changes would be lost the next time the plugin is updated. Moving your alterations to your own plugin and using the hooks system, avoids this and your changes will remain after updates are applied.

You can see this system in action in this situation. We have multiple plugins combining to provide payment features and a system for people to add their own custom payment options. The Advanced Bank Payment Transfer Gateway plugin is using the WooCommerce Payment Gateway API, and WooCommerce is using the WordPress core Plugin API.

Based on what you’ve described with bank transfers in your location working differently, you may be best served by using the WooCommerce Payment Gateway API to define a new payment gateway that suits your needs.