Add helping text to the "Continue With Stripe" button

I need some assistance with a code snippet that adds a description/helping text to the “continue with stripe” button when a user is to update his or her profile, and become a vendor.

Is this possible?

I have been searching and trying alot of combinations, but cannot seem to get the text to show up. Here is my starting point:

add_filter(
	'hivepress/v1/forms/vendor_update',
	function ($form) {
		$form['footer']['description'] = 'custom text here';

		return $form;
	},
	1000
);

I’ve also tried several other combinations, but I’m not sure how to “dig” into the structure, and hit the right spot. Any help would be appreciated, thank you

Please try this PHP snippet but please note that it can require further customization. If you are not familiar with the code customization then please consider hiring someone for custom work https://fvrr.co/32e7LvY

add_filter(
	'hivepress/v1/forms/user_update_profile',
	function ($fields, $form) {
		
		// Check settings.
		if ( get_option( 'hp_payout_system' ) !== 'stripe' ) {
			return $fields;
		}

		// Get vendor.
		if ( ! $form->get_model() ) {
			return $fields;
		}

		$vendor = \HivePress\Models\Vendor::query()->filter(
			[
				'status' => [ 'auto-draft', 'draft', 'publish' ],
				'user'   => $form->get_model()->get_id(),
			]
		)->get_first();

		if ( !$vendor || $vendor->is_stripe_setup() ) {
			return $fields;
		}
		
		$fields['footer'] = '<p>custom text here</p>';

		return $fields;
	},
	1000,
	2
);
1 Like

Seemes to be working in the correct place. Thank you :slight_smile:

1 Like

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