I have this pseudo code I'm writing to compare the user meta values. I have some user meta that will hold a null value until the user update his account, before the values are updated I need to check if they differ otherwise I want to leave them untouched inside the wp database. My idea is to get the user meta, loop them and do the comparision. In my case I can have a meta value named shipping_address and another that will hold the updated info that can be named new_shipping_values.
What can be a good solution?
$stored_user_meta = get_user_meta( $user_id );
$user_meta = array();
foreach( $stored_user_meta as $key ){
foreach( $key as $val ){
//check the array values and use only updated info
}
}
Thank you for the suggestions