how to check a plugin is activated or not in wordpress

Rate this post

Today, We want to share with you how to check a plugin is activated or not in wordpress.In this post we will show you wordpress plugin require another plugin, hear for fatal error: uncaught error: call to undefined function is_plugin_active() we will give you demo and example for implement.In this post, we will learn about How to Check Whether Core Plugin is Activated Before Allowing Addon Activation with an example.

how to check a plugin is activated or not in wordpress

There are the Following The simple About how to check a plugin is activated or not in wordpress Full Information With Example and source code.

READ :  isset vs empty vs is_null in PHP Example

As I will cover this Post with live Working example to develop Checking if a dependent plugin is active, so the wordpress load plugin after another for this example is following below.

Use is_plugin_active() to check If a WordPress Plugin is Activate

[php]
if ( is_plugin_active( ‘plugin-folder/plugin-file.php’ ) ):
{
echo ‘The plugin IS activated’;
} else {
echo ‘The plugin is NOT activated’;
}
[/php]

Replace ‘plugin-folder/plugin-file.php’ with the main folder as well as main file name of the plugin you want to custom target. For example: ‘jdk/jdk.php’ to check if jdk is installed and activated.

If the source code will run in the public area of the web site, just simple this include line of PHP source code above the previous one:

READ :  16 Great Commonly used PHP String Functions

[php]
include_once( ABSPATH . ‘wp-admin/includes/plugin.php’ );
[/php]

Web Programming Tutorials Example with Demo

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about how to check a plugin is activated or not in wordpress.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Leave a Reply

Your email address will not be published.