Update form_id in wp_usermeta table
-
Hi,
after migration of UM users to another website ‘form_id’ in wp_usermeta no longer matches.It seems I need to change form_id for all users in wp_usermeta table. The form_id value needs to be updated in two places for each user:
1. in the ‘form_id’ field
2. inside the serialized array in the ‘submitted’ fieldThis can be done programmatically by using update_user_meta() – function.
Something along these lines:
$user_id = $some_user_id; $toupdate= array( 'form_id' => $some_form_id, 'submitted' => ???? ); foreach( $toupdate as $k => $new_val ){ update_user_meta($user_id, $k, $new_val ); }
I can’t figure out how to target ‘form_id’ inside the serialized submitted array.
Any help here is very appreciated.Regards
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Update form_id in wp_usermeta table’ is closed to new replies.