I am going to build a WordPress plugin, I would like to check if a third WordPress plugin was installed and activated or not.
You can use “is_plugin_active” function to check if a WordPress plugin was activated or not
if ( ! is_plugin_active( 'test-plugin/test-plugin.php' ) and current_user_can( 'activate_plugins' ) ) { wp_die('Sorry, but this plugin requires Test plugin to be installed and active.'); }