Add custom condition to the listing flow

Hi, I know native KYC integration is still on the roadmap (referencing this thread). In the meantime I already have manual document verification working via a custom Attachment attribute + admin review.

What I need is the gating logic: how can I hook into the listing submission / application flow to check a vendor/user attribute value (e.g. verification_status == verified) and redirect unverified users to a notice/verification page if it’s not set?

Is there a documented hook (hivepress/v1/models/... or template override) for this, or does it require overriding a controller method? A pointer to the right hook name would be enough — I can build the conditional logic myself.

Hi,

If you mean adding a custom condition to detect a listing page and redirect users when the condition isn’t met, here’s a simple example snippet:

add_action(
	'template_redirect',
	function() {
		if ( hivepress()->router->get_current_route_name() !== 'listing_submit_details_page' ) {
			return;
		}

		// add custom logic here
		$verified = false;

		if ( ! $verified ) {
			wp_safe_redirect( home_url( '/custom-page-slug' ) );

			exit;
		}
	}
);

Hope this helps and wishing you a relaxing weekend.

P.S. I hope you don’t mind that I created a separate topic for your request. This makes it easier for other users to find the solution if they’re looking for the same functionality in the future.

1 Like