How to update billing_city data in woocommerce from facebook?

时间:2017-08-04 12:24:57

标签: wordpress hook-woocommerce woocommerce-rest-api

I'm making users sign up through facebook on my woo commerce. Also, I'm able to update first_name, last_name, email, id in WordPress wp_update_user. But unable to fetch city in billing_city. How it could be done. Any help will be appreciated. Thanks. Code which I used is:

$user = apply_filters( 'fbl/user_data_login', array(
    'fb_user_id'   => $fb_user['id'],
    'first_name'   => $fb_user['first_name'],
    'last_name'    => $fb_user['last_name'],
    'user_email'   => $fb_user['email'],
    'billing_city' => $fb_user['location'],
    'user_url'     => $fb_user['link'],
    'user_pass'    => wp_generate_password(),
));

0 个答案:

没有答案