d237256aa9
* Abstract WP plugin code into a PluginsHelper class We plan to use these methods in the Marketing tab. * Add PluginsHelper::is_plugin_active() * Add PluginsHelper::is_plugin_installed() * Add PluginsHelper::get_plugin_data() * Add PluginsHelper::get_plugin_path_from_slug() * Refactor PluginsHelper::get_plugin_data method Using the new get_plugin_path_from_slug method * Refactor is_plugin_installed and is_plugin_active Also adds support for plugin slugs or paths as parameters. * Ensure get_plugins() function is available for PluginsHelper * Ensure plugin path is a string before checking if installed/active * PHPCS fixes * Add initial unit tests for PluginsHelper * Check plugin data array keys rather than all values Will make it less fragile when Woo plugin data changes * Fix typos Co-authored-by: Daniel Bitzer <danielbitzer@gmail.com> |
||
---|---|---|
plugins/woocommerce-admin |