WordPress at a glance
function is not described

WC_API_Authentication::update_api_key_last_access() private WC 2.4.0

Updated API Key last access datetime

{} It's a method of the class: WC_API_Authentication{}

No Hooks.

Return

Null. Nothing.

Usage

// private - for code of main (parent) class only
$result = $this->update_api_key_last_access( $key_id );
$key_id(int) (required)
-

Changelog

Since 2.4.0 Introduced.

Code of WC_API_Authentication::update_api_key_last_access() WC 5.0.0

<?php
private function update_api_key_last_access( $key_id ) {
	global $wpdb;

	$wpdb->update(
		$wpdb->prefix . 'woocommerce_api_keys',
		array( 'last_access' => current_time( 'mysql' ) ),
		array( 'key_id' => $key_id ),
		array( '%s' ),
		array( '%d' )
	);
}