tomp
October 2, 2022, 1:29pm
1
Can we limit the list of countries in the country drop-down for user update form (hivepress/v1/forms/user_update) to just United States and Italy?
This is the form you fill out when creating a listing for the first time and then proceeding to Stripe. We don’t want countries in the list that aren’t accepted by Stripe.
Thanks,
Tom
1 Like
ihor
October 3, 2022, 10:13pm
3
Yes, it may be possible with a code snippet, please try this one:
add_filter(
'hivepress/v1/forms/user_update',
function( $form ) {
if(isset($form['fields']['country'])){
$form['fields']['country']['options'] = ['US' => 'United States', 'IT' => 'Italy'];
}
return $form;
},
1000
);
tomp
October 4, 2022, 12:23pm
4
Works great thank you Ihor!
-Tom
1 Like
system
Closed
November 3, 2022, 12:24pm
5
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.