Pre-populate Woocommerce checkout fields

Pre-populate Woocommerce checkout fields for logged in user.
This will populate ‘value’ attribute of checkout input field.

13 Comments

  1. Hi, thanks for code, Im wondering what if user is not logged in? Can we still pass values from Contact form 7 to woocommerce checkout fields ?

    1. Hi Suyog,

      Not sure how you want to pass it, but I think it should be possible to pass anything into this filter.
      I think the WooCommerce user data is saved into cookie along with cart data so it should work.

    2. As Suyon I’m looking to pass value from CF7 to some fields into Woocomerce, but fileds are in theproduct page. Is it possibile with a similar code?

  2. As Suyon I’m looking to pass value from CF7 to some fields into Woocomerce, but fileds are in theproduct page. Is it possibile with a similar code?

  3. how to get user extra information in this way? like if i created extra field and name if address can i get that value through this code?

  4. Hy
    Thanks for your code.
    Currently I add one new extra filed “Code” in Woocommerce checkout page.
    Can I unable to auto fill this filed same as name and billing address filed?

  5. Thanks this works great for putting data saved in Woocommerce profile fields. Not having any luck getting data from custom meta keys using UPME plugin. Any ideas?

Leave a Reply

Your email address will not be published. Required fields are marked *