Limit List of Countries in Drop-Down Country on User Update

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.


1 Like

Yes, it may be possible with a code snippet, please try this one:

	function( $form ) {
		  $form['fields']['country']['options'] = ['US' => 'United States', 'IT' => 'Italy'];

		return $form;

Works great thank you Ihor!


1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.