wc_enable_wc_plugin_headers()
Read in WooCommerce headers when reading plugin headers.
Хуков нет.
Возвращает
Массив.
Использование
wc_enable_wc_plugin_headers( $headers );
- $headers(массив) (обязательный)
- Headers.
Список изменений
| С версии 3.2.0 | Введена. |
Код wc_enable_wc_plugin_headers() wc enable wc plugin headers WC 10.9.4
function wc_enable_wc_plugin_headers( $headers ) {
if ( ! class_exists( 'WC_Plugin_Updates' ) ) {
include_once __DIR__ . '/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;
}