WordPress at Your Fingertips
function is not described

WC_Plugin_Updates::get_plugins_with_header() protected WC 1.0

Get plugins that have a valid value for a specific header.

{} It's a method of the class: WC_Plugin_Updates{}

Hooks from the method

Return

Array. Array of plugins that contain the searched header.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_plugins_with_header( $header );
$header(string) (required)
Plugin header to search for.

Code of WC_Plugin_Updates::get_plugins_with_header() WC 5.9.0

protected function get_plugins_with_header( $header ) {
	$plugins = get_plugins();
	$matches = array();

	foreach ( $plugins as $file => $plugin ) {
		if ( ! empty( $plugin[ $header ] ) ) {
			$matches[ $file ] = $plugin;
		}
	}

	return apply_filters( 'woocommerce_get_plugins_with_header', $matches, $header, $plugins );
}