title: Output URL from custom registration field woocomerce/wordpress
body: <p>I'm creating a site for members only, on the registration page I need to put an input to upload files so far everything is ok, but the problem is that I need the uploaded file to appear in <code>wp-admin</code> in the user menu as a link download button or download button so that administrators can validate the uploaded file.</p>
  <p>In the <a href="https://developer.wordpress.org/reference/functions/get_the_author_meta/" rel="nofollow noreferrer">wordpress documentation</a> there is a <code>get_the_author_meta()</code> function and I am using this function to show the value of the file in the user profile, but it just returns the file <code>ID</code> and I would like to return the <code>URL</code> so that I can link the url to download.</p>
  <p>here my code:</p>
  <p>Custom Input to register form</p>
  <pre><code>// Add file input to register form
  function add_woo_account_registration_fields() {
      
     ?&gt;
      
     &lt;p class=&quot;form-row&quot; id=&quot;image_files&quot;&gt;
  
        &lt;label for=&quot;image_files&quot; class=&quot;&quot;&gt;Image (JPG, PNG, PDF)&lt;/label&gt;
  
        &lt;span class=&quot;woocommerce-input-wrapper&quot;&gt;
           &lt;input type='file' name='image_files' accept='image/*,.pdf'&gt;
        &lt;/span&gt;
  
     &lt;/p&gt;
      
     &lt;?php
         
  }
  
  add_action( 'woocommerce_register_form', 'add_woo_account_registration_fields' );
  </code></pre>
  <p>Validade new custom field</p>
  <pre><code>// 2. Validate new field
  function validate_woo_account_registration_fields( $errors, $username, $email ) {
     if ( isset( $_POST['image_files'] ) &amp;&amp; empty( $_POST['image_files'] ) ) {
        $errors-&gt;add( 'image_files_error', __( 'Please provide a valid image', 'woocommerce' ) );
     }
     return $errors;
  }
  
  add_filter( 'woocommerce_registration_errors', 'validate_woo_account_registration_fields', 10, 3 );
  </code></pre>
  <p>Save new field</p>
  <pre><code>// Save new field
  function save_woo_account_registration_fields( $customer_id ) {
     if ( isset( $_FILES['image_files'] ) ) {
        require_once( ABSPATH . 'wp-admin/includes/image.php' );
        require_once( ABSPATH . 'wp-admin/includes/file.php' );
        require_once( ABSPATH . 'wp-admin/includes/media.php' );
        $attachment_id = media_handle_upload( 'image_files', 0 );
        if ( is_wp_error( $attachment_id ) ) {
           update_user_meta( $customer_id, 'image_files', $_FILES['image_files'] . &quot;: &quot; . $attachment_id-&gt;get_error_message() );
        } else {
           update_user_meta( $customer_id, 'image_files', $attachment_id );
        }
     }
  }
  
  add_action( 'user_register', 'save_woo_account_registration_fields', 1 );
  </code></pre>
  <p>Allow image upload</p>
  <pre><code>// Add enctype to form to allow image upload
  function enctype_custom_registration_forms() {
     echo 'enctype=&quot;multipart/form-data&quot;';
  }
  
  add_action( 'woocommerce_register_form_tag', 'enctype_custom_registration_forms' );
  </code></pre>
  <p>Backend
  Add Field to wp-admin</p>
  <pre><code>// Add field - admin
  function add_user_files_field( $user ) {
     ?&gt;
         &lt;h3&gt;&lt;?php _e('File','woocommerce' ); ?&gt;&lt;/h3&gt;
         &lt;table class=&quot;form-table&quot;&gt;
             &lt;tr&gt;
                 &lt;th&gt;
                    &lt;label for=&quot;image_files&quot;&gt;&lt;?php _e( 'Files', 'woocommerce' ); ?&gt;&lt;/label&gt;
                 &lt;/th&gt;
                 &lt;td&gt;
                    
                    &lt;!-- download file --&gt;
                    &lt;a href=&quot;&lt;?php echo esc_attr( get_the_author_meta( 'image_files', $user-&gt;ID ) ); ?&gt;&quot; download&gt;Download&lt;/a&gt;
                    
                 &lt;/td&gt;
             &lt;/tr&gt;
         &lt;/table&gt;
         &lt;br/&gt;
     &lt;?php
  }
  add_action( 'show_user_profile', 'add_user_files_field', 10, 1 );
  add_action( 'edit_user_profile', 'add_user_files_field', 10, 1 );
  </code></pre>
  <p>Save Field</p>
  <pre><code>// Save field - admin
  function save_user_files_field( $user_id ) {
     if( ! empty($_POST['image_files']) ) {
         update_user_meta( $user_id, 'image_files', sanitize_text_field( $_POST['image_files'] ) );
     }
  }
  add_action( 'personal_options_update', 'save_user_files_field', 10, 1 );
  add_action( 'edit_user_profile_update', 'save_user_files_field', 10, 1 );
  </code></pre>
  <p>I know <code>get_the_author_meta( 'image_files', $user-&gt;ID )</code> will return me the file <code>ID</code> would there be another function to return the file <code>URL</code>?</p>