Support » Plugin: WooCommerce » Auto populate value fields in checkout billing/shipping area

  • Resolved nutt318

    (@nutt318)


    I was able to figure out how to auto populate the users first name and last name within the my-account page on woocommerce by editing form-edit-address.php and adding the following code to line 35 and it works great.

    if (!$value && ($key=='billing_first_name' || $key =='shipping_first_name')) $value = $current_user->user_firstname;
    if (!$value && ($key=='billing_last_name' || $key =='shipping_last_name')) $value = $current_user->user_lastname;

    Now when going through the check out process I want it to be able to auto populate those same default value fields for firstname and lastname if they didnt update them on the my account page. I thought it would carry over but there must be something im not seeing.

    Thanks!

    http://wordpress.org/extend/plugins/woocommerce/

Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Auto populate value fields in checkout billing/shipping area’ is closed to new replies.