What is the best way to modify a plugin? I frequently want to make small changes to one or two functions within a large plugin. This is easily done, but I have to use comments to mark my changes and modify the plugin again after an update. Ideally I’d like to leave the plugin alone and make my changes elsewhere, much like we do with themes and child themes. Can I make a plugin that requires the parent plugin and will override it?
IMHO, the best approach is either to fork the Plugin to maintain your changes, or else submit patches to the Plugin developer, to have your changes made a part of the original Plugin.
Creating a “Child Plugin” really isn’t easy. The “Child Theme” concept really applies to the template files that get used, moreso than the Theme functions (and in fact, the functions.php
file from both Parent and Child get loaded, which does cause problems for improperly coded functions.php
files in either the Child or Parent Theme).