I am developing plugin that is depend on another plugin, my issue is I want to track actions in my plugin that is defined in another plugin. so please suggest me how can I do this
Asked
Active
Viewed 158 times
2 Answers
2
You can check another plugin is activated or not with this conditions.
Add following code into your plugin where you want to check.
$plugin = 'Another-Plugin-Name'; //The name of the plugin sub-directory/file.
if( is_plugin_active($plugin) )
{
//add you action or whatever...
}
Hope it help.

Akshay Paghdar
- 3,599
- 2
- 22
- 41
0
You could try scanning the plugins folder and retrieving the meta data for each plugin using get_plugin_data
https://codex.wordpress.org/Function_Reference/get_plugin_data
Or you could parse the get_option('active_plugins') feed as seen here:
How do I get activated plugin list in wordpress plugin development?