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


I’m looking to make small changes to the Advanced Bank Payment Transfer Gateway plugin and was looking for guidance for this since reaching out to the developer didn’t help.

Basically this plugin works like I want it to, however I’m from a place disconnected from the international banking system, so the info we need to make a bank transfer is a bit different, the info it currently asks to fill in and shows to the clients is this:

standard format

but I need it to ask for something like this:


Can I somehow clone or copy the plugin and have a new plugin that works the way I need it?

Absolute noob here so any advice or guidance is very welcomed.
Thanks for reading!

in progress 0
Stoic Maths 1 year 2021-07-30T21:29:44-05:00 0 Answer 0 views 0

Answer ( 1 )


    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.

Leave an answer