WordPress at a glance
function is not described

wc_update_user_last_active() WC 3.4.0

Set the user last active timestamp to now.

No Hooks.

Return

Null. Nothing.

Usage

wc_update_user_last_active( $user_id );
$user_id(int) (required)
User ID to mark active.

Changelog

Since 3.4.0 Introduced.

Code of wc update user last active: woocommerce/includes/wc-user-functions.php WC 3.7.0

<?php
function wc_update_user_last_active( $user_id ) {
	if ( ! $user_id ) {
		return;
	}
	update_user_meta( $user_id, 'wc_last_active', (string) strtotime( date( 'Y-m-d', current_time( 'timestamp', true ) ) ) );
}