WC_Plugin_Updates::get_plugins_with_header( string $header )

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


Description Description


Parameters Parameters

$header

(Required) Plugin header to search for.


Top ↑

Return Return

(array) Array of plugins that contain the searched header.


Top ↑

Source Source

File: includes/admin/plugin-updates/class-wc-plugin-updates.php

	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 );
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.