Merging with existing billing phone number is complicated.
In woocommerce by default, two ( or more ) different users can have same billing phone number. There is no check.
But for login purpose, phone number needs to be unique.
You can use the below code to merge existing billing phone number with plugin phone number field. (Goes in functions.php)
1) Change +91 below to your country code if not India
2) Visit https://www.yourwebsite.com/wp-admin/admin.php?page=xoo-ml, the code will run & it may take few seconds to load page.
Once the page is loaded, you can remove the code.
add_action( 'init', function(){
if( !is_admin() || wp_doing_ajax() || !isset( $_GET['page'] ) || $_GET['page'] !== 'xoo-ml' ) return; // run only on otp settings page
$args = array(
'role' => 'customer',
);
$users = get_users( $args );
$phone_code = '+91';
//loop users
foreach ( $users as $user ) {
$billing_phone = get_user_meta( $user->ID, 'billing_phone', true ); //Get billing phone
if( !$billing_phone ) continue; // switch to next user if billing phone is empty
update_user_meta( $user->ID, 'xoo_ml_phone_code', $phone_code ); //Update phone code required for login
update_user_meta( $user->ID, 'xoo_ml_phone_no', $billing_phone ); //Update phone number required for login
update_user_meta( $user->ID, 'xoo_ml_phone_display', $phone_code.$billing_phone ); // Just for display
}
} );