woocommerce_rest_api_cache_settings filter-hookWC 10.5.0

Filter REST API cache settings.

Usage

add_filter( 'woocommerce_rest_api_cache_settings', 'wp_kama_woocommerce_rest_api_cache_settings_filter' );

/**
 * Function for `woocommerce_rest_api_cache_settings` filter-hook.
 * 
 * @param array $settings REST API cache settings.
 *
 * @return array
 */
function wp_kama_woocommerce_rest_api_cache_settings_filter( $settings ){

	// filter...
	return $settings;
}
$settings(array)
REST API cache settings.

Changelog

Since 10.5.0 Introduced.

Where the hook is called

WC_Settings_Advanced::get_settings_for_rest_api_caching_section()
woocommerce_rest_api_cache_settings
woocommerce/includes/admin/settings/class-wc-settings-advanced.php 513
return apply_filters( 'woocommerce_rest_api_cache_settings', $settings );

Where the hook is used in WooCommerce

Usage not found.