• Resolved khushbu padalia

    (@khushbupadalia)


    Hello Author,

    When I use sign-in from Facebook option, My First Name and Last Name fill same(First name) data from facebook.

    I have checked code(file : class-yith-social-login.php (line no:402))

    if ( isset( $user_info->lastName ) ) {
    				add_user_meta( $user_id, 'billing_last_name', $user_info->firstName, true );
    				add_user_meta( $user_id, 'shipping_last_name', $user_info->firstName, true );
    			}

    I do not understand why First Name is being added in last name field.

    https://wordpress.org/plugins/yith-woocommerce-social-login/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Shahin

    (@shahindeveloper)

    Same problem i am facing….Please help….

    Try this –

    Update your code with this –

    if ( isset( $user_info->lastName ) ) {
    add_user_meta( $user_id, ‘billing_last_name’, $user_info->lastName, true );
    add_user_meta( $user_id, ‘shipping_last_name’, $user_info->lastName, true );
    }

    then clear your browser cache and again try login with facebook.

    Thread Starter khushbu padalia

    (@khushbupadalia)

    Yes. I can do this by changing in plugin file. But it is not proper to change in plugin file.

    Thread Starter khushbu padalia

    (@khushbupadalia)

    The solution is that the author should solve this bug and then give update of plugin.

    Yes indeed. I just tell you the temp solution of this problem. 🙂

    Reinstall plugin a try

    Shahin

    (@shahindeveloper)

    Problem solved using this code
    if ( isset( $user_info->lastName ) ) {
    add_user_meta( $user_id, ‘billing_last_name’, $user_info->lastName, true );
    add_user_meta( $user_id, ‘shipping_last_name’, $user_info->lastName, true );
    }

    I have checked code(file : class-yith-social-login.php (line no:402))

    Thread Starter khushbu padalia

    (@khushbupadalia)

    Thank you Author

    Thread Starter khushbu padalia

    (@khushbupadalia)

    resolved

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘First Name and Last Name is same’ is closed to new replies.