wc_update_user_last_active( int $user_id )

Set the user last active timestamp to now.


Description Description


Parameters Parameters

$user_id

(Required) User ID to mark active.


Top ↑

Source Source

File: includes/wc-user-functions.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', time() ) ) );
}

Top ↑

Changelog Changelog

Changelog
Version Description
3.4.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.