Open SGr33n opened 4 years ago
hi @SGr33n TGMPA does not offer any hooks for that but WP natively does offer a hook you can use activated_plugin
.
Using that hook, you will need to check that the $plugin
which was activated was one of your required plugins, but I believe it should be usable for what you intend to do.
See: https://developer.wordpress.org/reference/hooks/activated_plugin/
Does that help ?
Thanks @jrnl! not at all, that's because if the user already activated the required plugin before I activate the TGMPA plugin it doesn't do the call. I think that TGMPA already do this check, in order to display the warning... we just have to know if there is some sort of hook.
@SGr33n Ah! Sorry, your question was a little ambigious.
In that case - you can use the (again) WP native is_plugin_active()
method to check this for your required plugins.
Also see: #484 #485, #638.
Hi, I'm looking for a callback to call when the required plugin is activated. No mention about something like this on the configuration. I'm just looking for a way to set a custom option for the activated plugin. Does already exist an hook that allows to do something like this?
Thanks!