woocommerce_disable_rest_api_access_log filter-hookWC 7.7.0

This filter enables the exclusion of the most recent access time from being logged for REST API calls.

Usage

add_filter( 'woocommerce_disable_rest_api_access_log', 'wp_kama_woocommerce_disable_rest_api_access_log_filter', 10, 3 );

/**
 * Function for `woocommerce_disable_rest_api_access_log` filter-hook.
 * 
 * @param bool $result  Default value.
 * @param int  $key_id  Key ID associated with REST API request.
 * @param int  $user_id User ID associated with REST API request.
 *
 * @return bool
 */
function wp_kama_woocommerce_disable_rest_api_access_log_filter( $result, $key_id, $user_id ){

	// filter...
	return $result;
}
$result(true|false)
Default value.
$key_id(int)
Key ID associated with REST API request.
$user_id(int)
User ID associated with REST API request.

Changelog

Since 7.7.0 Introduced.

Where the hook is called

WC_REST_Authentication::update_last_access()
woocommerce_disable_rest_api_access_log
woocommerce/includes/class-wc-rest-authentication.php 599
if ( apply_filters( 'woocommerce_disable_rest_api_access_log', false, $this->user->key_id, $this->user->user_id ) ) {

Where the hook is used in WooCommerce

Usage not found.