From 948963f5c72a77ffb2a7774aae428aada430c53b Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Fri, 10 Mar 2017 01:57:53 -0300 Subject: [PATCH 1/2] Uses GMT/UTC+0 when update customer lastt_update --- includes/wc-user-functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/wc-user-functions.php b/includes/wc-user-functions.php index 3647851a79e..44fa2af7482 100644 --- a/includes/wc-user-functions.php +++ b/includes/wc-user-functions.php @@ -563,7 +563,7 @@ add_action( 'update_user_meta', 'wc_meta_update_last_update_time', 10, 4 ); * @param int $user_id The user to set a timestamp for. */ function wc_set_user_last_update_time( $user_id ) { - update_user_meta( $user_id, 'last_update', time() ); + update_user_meta( $user_id, 'last_update', (int) gmdate( 'U' ) ); } /** From dbbe4617eebb961336ec18ccabd6ce74dca0df80 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Fri, 10 Mar 2017 01:58:53 -0300 Subject: [PATCH 2/2] Do not force integer since will be saved as string by WordPress --- includes/wc-user-functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/wc-user-functions.php b/includes/wc-user-functions.php index 44fa2af7482..ffcf955b82b 100644 --- a/includes/wc-user-functions.php +++ b/includes/wc-user-functions.php @@ -563,7 +563,7 @@ add_action( 'update_user_meta', 'wc_meta_update_last_update_time', 10, 4 ); * @param int $user_id The user to set a timestamp for. */ function wc_set_user_last_update_time( $user_id ) { - update_user_meta( $user_id, 'last_update', (int) gmdate( 'U' ) ); + update_user_meta( $user_id, 'last_update', gmdate( 'U' ) ); } /**