wc_set_user_last_update_time

Sets a user's "last update" time to the current timestamp.

Description

wc_set_user_last_update_time( (int) $user_id ); 

Parameters (1)

0. $user_id (int)
The user to set a timestamp for.

Usage

  1. if ( !function_exists( 'wc_set_user_last_update_time' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-user-functions.php'; 
  3.  
  4. // The user to set a timestamp for. 
  5. $user_id = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wc_set_user_last_update_time($user_id); 
  9.  

Defined (1)

The function is defined in the following location(s).

/includes/wc-user-functions.php  
  1. function wc_set_user_last_update_time( $user_id ) { 
  2. update_user_meta( $user_id, 'last_update', gmdate( 'U' ) );