WC_Helper::get_all_plugin_keys │ private static │ WC 11.2.0

Keys of every installed plugin, as auto_update_plugins stores them.

Method of the class: WC_Helper{}

Hooks from the method

Returns

string[].

Usage

$result = WC_Helper::get_all_plugin_keys(): array;

Changelog

Since 11.2.0 Introduced.

WC_Helper::get_all_plugin_keys() code WC 11.2.1

private static function get_all_plugin_keys(): array {
	require_once ABSPATH . 'wp-admin/includes/plugin.php';

	// Core's own filter, documented in wp-admin/includes/class-wp-plugins-list-table.php; applied here so this
	// path sees the same plugin list core's auto-update toggle does.
	// phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment, WooCommerce.Commenting.CommentHooks.MissingSinceComment -- Not a WooCommerce hook.
	return array_keys( (array) apply_filters( 'all_plugins', get_plugins() ) );
}