• Resolved apinis

    (@apinis)


    Hey there everyone!

    I have a problem with woocommerce auto fill checkout details. When user is logged in it does not fill the billing details automatically. When i write them manually the details are updated in my-account page but next time they wont auto fill in.

    Where should I look?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Try This one
    add_filter(‘woocommerce_checkout_get_value’, function($input, $key ) {
    global $current_user;
    switch ($key) :
    case ‘billing_first_name’:
    case ‘shipping_first_name’:
    return $current_user->first_name;
    break;

    case ‘billing_last_name’:
    case ‘shipping_last_name’:
    return $current_user->last_name;
    break;
    case ‘billing_email’:
    return $current_user->user_email;
    break;
    case ‘billing_phone’:
    return $current_user->phone;
    break;
    endswitch;
    }, 10, 2);

Viewing 1 replies (of 1 total)
  • The topic ‘Woocommerce does not auto fill billing details from loged in users’ is closed to new replies.