file_exists
expects a path, not a URL. To get the path to an arbitrary plugin you’ll need to use WP_PLUGIN_DIR
:
$pathpluginurl = WP_PLUGIN_DIR . '/advanced-custom-fields/acf.php';
$isinstalled = file_exists( $pathpluginurl );
file_exists
expects a path, not a URL. To get the path to an arbitrary plugin you’ll need to use WP_PLUGIN_DIR
:
$pathpluginurl = WP_PLUGIN_DIR . '/advanced-custom-fields/acf.php';
$isinstalled = file_exists( $pathpluginurl );