Override Widget class in plugins with custom plugin

You’re actually quite close to answering your own question. Your plugin would have to start with checking whether the plugin is active (which you can also do with function_exists).

The you indeed can use remove_action to make sure functions and classes aren’t activated. This doesn’t mean these functions become undefined.

So yes, you will need to extend the class if you want to customize it. If you don’t define a constructor in that customized class, the parent’s constructor will be use.

Leave a Comment

tech