Skip to main content
Tweeted twitter.com/#!/StackWordPress/status/177269934697619457
added 306 characters in body
Source Link

I have a plugin activated and working, and I installed and activated another plugin I wrote to communicate with it. However when I run is_plugin_active() I get false returned - does anyone have any idea why and how to rectify it?

EDIT: some basic code. I am in the admin area, and I'm trying to use the functions of the other plugin ultimately. But the initial check is quite basic:

if (is_plugin_active('Plugin2')) {
    echo 'Thanks for installing Plugin2';
} else {
    echo 'Please install Plugin2';
}

EDIT2: Per the codex, you do NOT need the filepath if you're using in the admin side. But I tried with the full path, as modified here, which also did not work.

if (is_plugin_active('Plugin2/Plugin2.php')) {
    echo 'Thanks for installing Plugin2';
} else {
    echo 'Please install Plugin2';
}

I have a plugin activated and working, and I installed and activated another plugin I wrote to communicate with it. However when I run is_plugin_active() I get false returned - does anyone have any idea why and how to rectify it?

EDIT: some basic code. I am in the admin area, and I'm trying to use the functions of the other plugin ultimately. But the initial check is quite basic:

if (is_plugin_active('Plugin2')) {
    echo 'Thanks for installing Plugin2';
} else {
    echo 'Please install Plugin2';
}

I have a plugin activated and working, and I installed and activated another plugin I wrote to communicate with it. However when I run is_plugin_active() I get false returned - does anyone have any idea why and how to rectify it?

EDIT: some basic code. I am in the admin area, and I'm trying to use the functions of the other plugin ultimately. But the initial check is quite basic:

if (is_plugin_active('Plugin2')) {
    echo 'Thanks for installing Plugin2';
} else {
    echo 'Please install Plugin2';
}

EDIT2: Per the codex, you do NOT need the filepath if you're using in the admin side. But I tried with the full path, as modified here, which also did not work.

if (is_plugin_active('Plugin2/Plugin2.php')) {
    echo 'Thanks for installing Plugin2';
} else {
    echo 'Please install Plugin2';
}
added code
Source Link

I have a plugin activated and working, and I installed and activated another plugin I wrote to communicate with it. However when I run is_plugin_active() I get false returned - does anyone have any idea why and how to rectify it?

EDIT: some basic code. I am in the admin area, and I'm trying to use the functions of the other plugin ultimately. But the initial check is quite basic:

if (is_plugin_active('Plugin2')) {
    echo 'Thanks for installing Plugin2';
} else {
    echo 'Please install Plugin2';
}

I have a plugin activated and working, and I installed and activated another plugin I wrote to communicate with it. However when I run is_plugin_active() I get false returned - does anyone have any idea why and how to rectify it?

I have a plugin activated and working, and I installed and activated another plugin I wrote to communicate with it. However when I run is_plugin_active() I get false returned - does anyone have any idea why and how to rectify it?

EDIT: some basic code. I am in the admin area, and I'm trying to use the functions of the other plugin ultimately. But the initial check is quite basic:

if (is_plugin_active('Plugin2')) {
    echo 'Thanks for installing Plugin2';
} else {
    echo 'Please install Plugin2';
}
Source Link

is_plugin_active() not properly returning true

I have a plugin activated and working, and I installed and activated another plugin I wrote to communicate with it. However when I run is_plugin_active() I get false returned - does anyone have any idea why and how to rectify it?