Skip to content

Commit 415d0f5

Browse files
committed
User values now updated when saving account form with an object cache.
1 parent fb08a4a commit 415d0f5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

includes/actions.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,3 +570,9 @@ function wpum_restrict_profile_page() {
570570

571571
add_action( 'template_redirect', 'wpum_restrict_profile_page' );
572572

573+
function wpum_flush_user_object_cache( $form, $values, $updated_user_id ) {
574+
wp_cache_delete( $updated_user_id, 'user_meta' );
575+
}
576+
add_action( 'wpum_after_custom_user_update', 'wpum_flush_user_object_cache', 100, 3 );
577+
add_action( 'wpum_after_user_update', 'wpum_flush_user_object_cache', 100, 3 );
578+

0 commit comments

Comments
 (0)