LLMS_Abstract_Email_Provider::activate_already_installed_plugin()
Determines if the plugin is already installed and activates it if it is
Return Return
(boolean|WP_Error) true
when plugin is installed and successfully activated. WP_Error
when plugin is installed and there was an error activating it. false
when plugin is not installed.
Source Source
File: includes/abstracts/llms-abstract-email-provider.php
protected function activate_already_installed_plugin() { $is_plugin_installed = false; foreach ( get_plugins() as $path => $details ) { if ( false === strpos( $path, '/' . $this->id . '.php' ) ) { continue; } $is_plugin_installed = true; $activate = activate_plugin( $path ); if ( is_wp_error( $activate ) ) { return $activate; } break; } return $is_plugin_installed; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.40.0 | Introduced. |