Hello.
Almost all my users are from Norway, so I have implemented an automatic process of selecting the country when an account is created.
add_action(
'hivepress/v1/models/vendor/create',
function ($vendor_id) {
if (get_option('hp_payout_system') === 'stripe') {
update_post_meta($vendor_id, 'hp_country', 'NO');
}
},
1000
);
// Removes the field from the front end
add_filter(
'hivepress/v1/forms/vendor_update',
function ($form) {
if (isset($form['fields']['country'])) {
$form['fields']['country'] = [
'type' => 'hidden',
];
}
return $form;
},
1000
);
However, on occasions, I have a user the rescide outside of Norway, that cannot move on with the Stripe Onboarding process because Norway was auto-selected. Now, when the damage is done, how can I change that users country from NO to a different country? There is no field in the back-end, and the hp_country field in the database has some user ID’s linked to them, but the IDs are not the same as the vendor draft ID nor the User ID. I have even tryed to change it in the Stripe Dashboard, but it seemes to only accept inputs from the API.
How can I fix this for the user?