How to prevent a function execution with another function?

Good on you for thinking ahead enough to not just edit the plugin.

Sadly if the plugin author didn’t include hooks for you to use it’s going to be tough. Maybe talk to the author about the hooks you need and/or make the changes and submit them to the author for implementation.

In some cases it may be possible to extend the plugin class, but this is going to depend on how the plugin is constructed and called. Or if they’re using filters or actions you may also be able to unload theirs and write your own version in its place. Without proper hooks though it’s still possible they’ll make a change that would break your adjustment.

Leave a Comment