title: Woocommerce: Set checkout field values
body: <p>For a special group of customers that aren't yet WP user in my system, I am directing them to a special page, where they'll choose from a limited set of products. I already have all of their information and I it's going to pre-populate on this landing page. When they've verified their information, it will add their product to the cart and skip straight to the checkout. I've got all that down so far. </p>
  
  <p>What I want to do is pre-populate the checkout data with the customer name and billing information that I have and I'm not entirely certain how to do that. But here's what I've got so far:</p>
  
  <pre><code>    function onboarding_update_fields( $fields = array() ) {
  
        $token = ( ! empty( $_GET['token'] ) ) ? $_GET['token'] : '';   
        if( 'testtoken' == $token ) {          
          $fields['billing']['billing_first_name']['value'] = 'Joe';
          var_dump( $fields ); 
        }  
        return $fields;
       }
  
      add_filter( 'woocommerce_checkout_fields', 'onboarding_update_fields' );
  </code></pre>
  
  <p>How do I change the value of the checkout fields? The code above doesn't do it. Point me in the right direction on one, and I can do the rest.</p>
  
  <p>I looked <a href="https://docs.woocommerce.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/" rel="nofollow noreferrer">here</a> but didn't quite find what I was looking for either.</p>
  
  <p>Thanks!</p>