woocommerce_enable_nocache_headers хук-фильтр . WC 1.0
Allow plugins to enable nocache headers. Enabled for Google weblight.
Использование
add_filter( 'woocommerce_enable_nocache_headers', 'filter_function_name_5328' ); function filter_function_name_5328( $enable_nocache_headers ){ // filter... return $enable_nocache_headers; }
- $enable_nocache_headers(true/false)
- Flag indicating whether to add nocache headers.
По умолчанию: false
Где вызывается хук
woocommerce_enable_nocache_headers
woocommerce/includes/class-wc-cache-helper.php 50
if ( false !== strpos( $agent, 'googleweblight' ) || apply_filters( 'woocommerce_enable_nocache_headers', false ) ) {