revert suggestion-related changes in helper:

- no longer required, now using active plugins for suggestions
- get_local_woo_plugins needs to not be cached
- left plugin `slug` in get_local_woo_plugins values, may be useful
This commit is contained in:
haszari 2019-02-27 10:19:56 +13:00
parent 69e3856188
commit 8dbda1b9c9
1 changed files with 0 additions and 15 deletions

View File

@ -1014,11 +1014,6 @@ class WC_Helper {
require_once ABSPATH . 'wp-admin/includes/plugin.php';
}
$woo_plugins = get_transient( 'wc_helper_installed_woo_plugins' );
if ( false !== $woo_plugins ) {
return $woo_plugins;
}
$plugins = get_plugins();
$woo_plugins = array();
@ -1055,19 +1050,9 @@ class WC_Helper {
$woo_plugins[ $filename ] = $data;
}
set_transient( 'wc_helper_installed_woo_plugins', $woo_plugins, DAY_IN_SECONDS );
return $woo_plugins;
}
/**
* Obtain a list of slugs of locally installed Woo extensions.
* (Cached for 1 day.)
*/
public static function get_local_woo_plugin_slugs() {
$slugs = wp_list_pluck( self::get_local_woo_plugins(), 'slug' );
return array_values( $slugs );
}
/**
* Get locally installed Woo themes.
*/