wc_update_user_last_active()
Set the user last active timestamp to now.
No Hooks.
Return
null
. Nothing (null).
Usage
wc_update_user_last_active( $user_id );
- $user_id(int) (required)
- User ID to mark active.
Changelog
Since 3.4.0 | Introduced. |
wc_update_user_last_active() wc update user last active code WC 9.4.2
function wc_update_user_last_active( $user_id ) { if ( ! $user_id ) { return; } update_user_meta( $user_id, 'wc_last_active', (string) strtotime( gmdate( 'Y-m-d', time() ) ) ); }