PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

populating fields with woocommerce meta

  1. Hello everybody,

    I have another question about populating fields with this time woocommerce meta informations.

    The facts: After a user registered and completed his order with woocommerce, i send him a questionnary form. I want to populate some fields with the informations the customer provided during the checkout like his name, last name, address, city and zipcode.

    I am not expert in php and i try several things in my functions.php without any success.
    Can someone help me with this plz?

    Cheers

    Posted 11 years ago on Tuesday May 28, 2013 | Permalink
  2. David Peralty

    How do you send him the questionnaire form. How were you attempting to populate the fields? Did you have them all set to populate dynamically in the form builder?

    Posted 11 years ago on Tuesday May 28, 2013 | Permalink
  3. Hello David and sorry for the late answer, i had few problems with my own computer.

    So It's a bit special, i send the questionnaire to the customer thrue a page thrue the module wp-client who create private area for client.

    So the customer have access to this page who contain the questionnaire thrue his personnal area.

    Yes i set them to populate dynamically and succeed with the email (user_contact_email in the parameter name) but i am not able to find the right woocommerce's shortcode to enter in the others fields (name, addresse).

    I add this in my functions.php for the email

    add_filter('gform_field_value_user_contact_email', create_function("", '$value = populate_usermeta(\'user_email\'); return $value;' ));
    function populate_usermeta($meta_key){
    global $current_user;
    return $current_user->__get($meta_key);
    }

    Thanks and sorry for my english sir.

    Posted 11 years ago on Friday June 14, 2013 | Permalink

This topic has been resolved and has been closed to new replies.