woocommerce_enable_nocache_headers filter-hookWC 1.0

Allow plugins to enable nocache headers. Enabled for Google weblight.

Usage

add_filter( 'woocommerce_enable_nocache_headers', 'wp_kama_woocommerce_enable_nocache_headers_filter' );

/**
 * Function for `woocommerce_enable_nocache_headers` filter-hook.
 * 
 * @param bool $enable_nocache_headers Flag indicating whether to add nocache headers.
 *
 * @return bool
 */
function wp_kama_woocommerce_enable_nocache_headers_filter( $enable_nocache_headers ){

	// filter...
	return $enable_nocache_headers;
}
$enable_nocache_headers(true|false)
Flag indicating whether to add nocache headers.
Default: false

Where the hook is called

WC_Cache_Helper::additional_nocache_headers()
woocommerce_enable_nocache_headers
woocommerce/includes/class-wc-cache-helper.php 58
if ( apply_filters( 'woocommerce_enable_nocache_headers', false ) ) {

Where the hook is used in WooCommerce

Usage not found.