Stripe onboarding process

Hello!

I’ve got a few questions regarding the integration of stripe connect.

  1. When choosing stripe connect as a payout system, a field of “country” is added to the vendor registration process. I need to set this automatically to a country of my choosing (all have the same country), remove the field from front end, but still push it to the stripe connect system.

  2. I also like to remove the stripe onboarding step of choosing product category by having hivepress auto choose a default value for all my vendors, in a similar way to the default country. Like “digitale goods”.

Thanks a lot in advance.

  1. Please try this PHP snippet. It will set the USA as the default country. Please check ISO country codes to change US in the code snippet on another country code
add_action(
	'hivepress/v1/models/vendor/create', 
	function($vendor_id) {
		if ( get_option( 'hp_payout_system' ) === 'stripe' ) {
			update_post_meta($vendor_id, 'hp_country', 'US');
		}
	},
	1000
);

add_filter(
	'hivepress/v1/forms/vendor_update',
	function($form){
		if(isset($form['fields']['country'])){
			$form['fields']['country'] = [
				'type' => 'hidden',
			];
		}
		
		return $form;
	},
	1000
);
  1. Sorry, there’s no simple code snippet for this, it would require a custom implementation. If customizations beyond the available features are required for your site, please consider hiring someone for custom work https://fvrr.co/32e7LvY

The snippet doesn’t seem to work. I get this error when trying to onboard a newly created account with stripe:

“You passed an empty string for ‘country’. We assume empty values are an attempt to unset a parameter; however ‘country’ cannot be unset. You should remove ‘country’ from your request or supply a non-empty value.”

Sorry for the inconvenience but this code snippet works only for new vendors. Please try to test it with the new vendor

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