Restrict to only allow Submit Offer by Verified User

How do I restrict the offer to only allow Verified Vendors to submit offer and no one else?

Is there a Snippet for this or any other way?

Please try this PHP snippet

	function( $errors, $form ) {
		$vendor_id = \HivePress\Models\Vendor::query()->filter(
					'verified' => true,
					'user' => get_current_user_id(),
					'status'       => 'publish',
		if(!current_user_can('edit_posts') || !$vendor_id){
			$errors[] = 'Only verified vendors can post offer';
		return $errors;
1 Like

It worked! Thank You!

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