Sorry, I wasn’t able to retrieve the $_GET
variables.
The solution was to retrieve the values from the database, and insert them into the proper places in the template file (form-edit-address.php)
This works 🙂
<?php
$user_id = get_current_user_id();
$user_info = get_userdata( $user_id );
$first_name = $user_info->first_name;
$last_name = $user_info->last_name;
?>
<?php do_action("woocommerce_before_edit_address_form_{$load_address}" ); ?>
<?php
foreach ( $address as $key => $field ) :
if ($key == 'billing_first_name' && $field['value'] == '')
woocommerce_form_field( $key, $field, $first_name );
elseif ($key == 'billing_last_name' && $field['value'] == '')
woocommerce_form_field( $key, $field, $last_name );
else
woocommerce_form_field( $key, $field, ! empty( $_POST[ $key ] ) ? wc_clean( $_POST[ $key ] ) : $field['value'] );
endforeach;
...