wc_enable_wc_plugin_headers()WC 3.2.0

Read in WooCommerce headers when reading plugin headers.

No Hooks.

Return

Array.

Usage

wc_enable_wc_plugin_headers( $headers );
$headers(array) (required)
Headers.

Changelog

Since 3.2.0 Introduced.

wc_enable_wc_plugin_headers() code WC 8.6.1

function wc_enable_wc_plugin_headers( $headers ) {
	if ( ! class_exists( 'WC_Plugin_Updates' ) ) {
		include_once dirname( __FILE__ ) . '/admin/plugin-updates/class-wc-plugin-updates.php';
	}

	// WC requires at least - allows developers to define which version of WooCommerce the plugin requires to run.
	$headers[] = WC_Plugin_Updates::VERSION_REQUIRED_HEADER;

	// WC tested up to - allows developers  to define which version of WooCommerce they have tested up to.
	$headers[] = WC_Plugin_Updates::VERSION_TESTED_HEADER;

	// Woo - This is used in WooCommerce extensions and is picked up by the helper.
	$headers[] = 'Woo';

	return $headers;
}