WordPress Changing input values

I’m trying to write a plugin, I keep my address records in my cart and I want to automatically fill my data with the input values on the payment page, but I couldn’t find it.

Following is my code:

add_filter('woocommerce_checkout_fields', 'custom_override_checkout_fields'); function custom_override_checkout_fields($  fields) { global $  wpdb;  $  list= $  wpdb->get_results("SELECT * From wp_adress");     foreach ($  list as $  value) {         $  firstname = $  value->firstname;         $  lastname = $  value->lastname;         $  phone = $  value->phone;     }     $  fields['billing']['billing_first_name']['value'] = '<?php echo $  value->firstname ?>';     $  fields['shipping']['shipping_first_name']['value'] = '<?php echo $  value->firstname ?>';     $  fields['shipping']['shipping_last_name']['value'] = '<?php echo $  value->lastname ?>';     $  fields['billing']['billing_phone']['value'] = '<?php echo $  value->phone ?> ';     return $  fields; } 

I just want to auto-fill the data in the database on the form checkout page.

Thanks in advance.