Manual vendor approval

Hi there,

This is to follow up on an old support request. See also this old gist.

We need to manually approve vendors (potentially users too) via some sort of ID verification. Here’s the ideal workflow:

  1. A vendor registers directly on a form with mandatory fields: name, surname, login, ID number and image upload.
  2. The provider is notified of the registration request which should display as “Approval pending” in the dashboard’s Vendors tab. No notification is sent to the requestor. The pending vendor’s profile is not published.
  3. The provider manually approves the pending subscription request by ticking the “Verified” checkbox. A notification e-mail is sent to the requestor with the customary confirmation link.
  4. The vendor’s profile is published and her/his login enabled as soon as the confirmation link is clicked – as it happens currently.

A simplified workflow could dispense with the ID image upload (step 1. above), which could be requested via other channels in step 3. What is paramount is to prevent the automatic publication of the vendor’s profile and keep his/her login disabled until the approval.

I might be able to hack a POC of the simplified workflow, but need some direction about where to start.

Cheers,

Marco

Sorry for the delay.

I recommend using the hivepress/v1/models/vendor/update_status hook and enable direct registration in HivePress/Settings/Vendors. This way you can “catch” the status change from Auto-draft to Published and change it back to Pending. You can use the hivepress/v1/emails/{email_name} hooks to clear the email content if needed, then the email will not be sent by HivePress.

Then you can review and Publish or delete the vendor profile in WordPress/Vendors section as the site administrator. When the vendor profile is published, you can also use the above hook to send a custom email to the vendor user (vendor profile is a custom post type “hp_vendor”, user ID is set in the post_author field).

Hope this helps

Thanks for the pointers @ihor. I’ll have a look!

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