How to Extend a Plugin

What is the best way to extend a plugin from wpmudev? I need to extend the Appointments+ plugin with some custom functionality. How can I do this so that it is not necessary to update the core plugin files when the plugin is updated? Is it possible to do in a similar way as making a child theme? Thank You.

  • Timothy Bowers

    Hey there.

    You can't make child plugins like themes unfortunately. But that would be cool.

    You would need to plan what you want and then study the code to decide on how to best implement what you need. Depending on what it is you might be able to extend the code with another plugin.

    I presume you are ok coding?

    If not then depending on what you need tweaky might be able to assist further:

    Take care.

  • rpeterson

    @the1john I have run into this time and time again. How I have handled it on one of out major WP installs is like this:

    Find the hooks / filters or functions that you want to modify. In your own customization plugins or as I do it in site-includes in my own load.php which gets loaded in WP (so I don't have to activate my plugin customizations, they are just always loaded) we create a clone of the function and change it. then inside of the plugin you want to modify, I wrap the original function in an if(! function_exists()) condition so that its there for fallback if something doesn't get loaded properly.

    This way you only mod the plugin slightly, and if you need some LTS for it, you can easily create awk commands to do these simple wrappings for you from the vendor branch. That way you're nod modifying the source and always have it as a reference and you don't deal with the headache of overwriting modification on plugin updates.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.