diff --git a/wp-includes/user.php b/wp-includes/user.php index cc128c26e4..595c4c8447 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -1873,6 +1873,7 @@ function update_user_caches( $user ) { * * @since 3.0.0 * @since 4.4.0 'clean_user_cache' action was added. + * @since 6.2.0 User metadata caches are now cleared. * * @param WP_User|int $user User object or ID to be cleaned from the cache */ @@ -1893,6 +1894,8 @@ function clean_user_cache( $user ) { wp_cache_delete( $user->user_email, 'useremail' ); } + wp_cache_delete( $user->ID, 'user_meta' ); + /** * Fires immediately after the given user's cache is cleaned. * diff --git a/wp-includes/version.php b/wp-includes/version.php index 54426a891e..a1519a4aa5 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.2-alpha-54939'; +$wp_version = '6.2-alpha-54940'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.