How to deactivate gravityforms WordPress plugin


I have a WordPress site which uses the gravityform plugin. Under certain circumstances I would like to deactivate the plugin programmatically and have it both be deactivated in the front end and show as such in the admin panel. When I then activate it in the admin panel, I would like the changes to be reflected in the front end (i.e. it now works again).

I have tried to achieve this by calling deactivate_plugins which does seem to deactivate it on the front end and indeed is_plugin_active returns false. However if I look at the admin panel under plugins it still appears as active. If I click deactivate and then activate it again in the admin panel it still shows up as deactivated on the front end.

Michael 2 months 2022-12-12T08:27:59-05:00 0 Answers 0 views 0

Leave an answer