wc_update_user_last_active()
Set the user last active timestamp to now.
Хуков нет.
Возвращает
null. Ничего (null).
Использование
wc_update_user_last_active( $user_id );
- $user_id(int) (обязательный)
- User ID to mark active.
Список изменений
| С версии 3.4.0 | Введена. |
Код wc_update_user_last_active() wc update user last active WC 10.4.3
function wc_update_user_last_active( $user_id ) {
if ( ! $user_id ) {
return;
}
update_user_meta( $user_id, 'wc_last_active', (string) time() );
}