What you’re building
A complete become-a-seller path:
- An app user fills in a Sign up as Vendor form (name, seller name, description, phone, email, password).
- The plugin creates (or reuses) the WordPress user, creates the vendor (a
wcpv_product_vendorsterm), stores profile/billing meta, geocodes the address, gives the user the pending vendor role, and notifies the applicant and every administrator (mam-product-vendor_new_application/…_adminnotification types). - Depending on your approval mode, the seller either waits for staff approval or is active immediately.
- Once the seller’s account exists, the onboarding checklist appears on their app home screen until they finish setting up: connect Stripe, complete the store profile, add a location, add a product.
Step 1 — Choose the approval mode
WP Admin → Mobile App Manager → Product Vendors → Settings, “Manual or Automatic Approvals for new Sellers” (option tsl-pv-seller-approval-type):
| Choice | Stored role for new sellers | Effect |
|---|---|---|
| Staff Approval Required (default) | wc_product_vendors_pending_vendor |
Seller waits in the Pending Vendors queue |
| Automatically Approve Requests | wc_product_vendors_admin_vendor |
Seller is live immediately |
Step 2 — Map the registration forms
The app flows are mam-main forms; map each form id in the Product Vendors form settings. The relevant ones for onboarding:
| Form (option key) | Handler | What it does |
|---|---|---|
mam_pv_mam_pv_signup_as_vendor_form |
signup_as_vendor |
Full sign-up: creates user + vendor, sets pending role, sends notifications |
mam_pv_mam_pv_register_as_seller_form |
register-as-seller AJAX path | Lightweight register-as-seller for an already-logged-in app user |
mam_pv_mam_pv_cancel_become_a_seller |
cancel_become_a_seller |
Lets an applicant withdraw (their own account only; role reverts to customer) |
mam_wc_pv_approve_vendor |
admin_approve_vendor |
The staff approval form (see Step 3) |
mam_pv_mam_pv_edit_vendor_form |
add_vendor |
Vendor profile editor |
Field-level mappings (first name, seller name, postid, approval toggle, …) are configured per form in the same settings UI; the handlers read field ids from <form option>_<field slug> options.
Optionally set Vendor Registration Redirect URL (mam_pv_mam_pv_vendor_registration_redirect_url) on the Settings tab to redirect web-based PV registrations.
Step 3 — Approve pending vendors
Two equivalent surfaces:
- WP Admin: Mobile App Manager → Product Vendors → Pending Vendors tab lists all vendors whose users hold the pending role; approve or edit from the grid (the vendor-all view shows approved vendors).
- In-app (store managers only): assign the WC PV – Admin PV Manager content class to a screen. It renders an approval form per pending vendor (name, description, phone, email, shop URL, approval toggle).
On approval the handler renames the vendor, saves profile/phone, clones storefront colors from the Master Vendor (option mam_wc_pv_master_vendor — set this first if you want consistent branding), promotes every connected user from pending to wc_product_vendors_admin_vendor, and sends the mam-product-vendors_admin_approve_vendor notification.
The approval notification supports two replacement tokens (26.29.1+): [username] and [reset_password_url] — a one-time WordPress set-password link for the vendor’s user account. Include both in the email template (Notification Manager → WC PV – Admin Approve Vendor) so newly approved vendors get login instructions and can set their password before signing in to the app. The link uses the standard WordPress reset key, which expires after 24 hours; an expired link drops the vendor on the normal “request a new link” screen, so access is never lost. Remember to enable the email channel for this notification — no channel is on by default.
Approval is gated server-side by mam_wc_pv_user_can_approve_vendor — only users with manage_woocommerce can approve, no matter which form id is submitted.
Step 4 — The onboarding checklist
Nothing to assign: once a user holds a pending/approved vendor role, the plugin appends onboarding buttons to the home-screen stack (filter mam_hss_stack_after_bottom_tabbar) until each step completes:
| Button | Shown until |
|---|---|
| Setup Your Stripe Account | the vendor’s Stripe Connect account is approved (requires mam-stripe-manager / Stripe Connect) |
| Setup Your Store Profile | the vendor has a logo |
| Add a location | the vendor has a published pv-location (shown only if mam_pv_mam_pv_add_location_form is mapped) |
| Add a product | the vendor has at least one product (shown only if mam_wc_pv_edit_listing is mapped) |
The button icons are configurable on the Settings tab (Onboarding Icon: Stripe Button / Pending Step / Completed Step — a wp-content-relative path or full URL; blank keeps the built-in defaults). To suppress the checklist entirely, return true from the mam_filter_bypass_vendor_onboarding filter.
New vendor profiles are stamped with the New Vendor Default Timezone setting (blank = UTC-8); developers can override per-site logic with the mam_wc_pv_default_timezone filter.
Registering vendors from code
Sibling plugins create vendors without touching this plugin’s classes by firing the action:
do_action( 'mam_wc_pv_process_vendor_registration', $user_id, 'wc_product_vendors_manager_vendor' );
See Hook: mam_wc_pv_process_vendor_registration.
Related articles
- Plugin: mam-woocommerce-product-vendors
- Recipe: Staff manager configuration
- Hook:
mam_wc_pv_process_vendor_registration - Hooks: `mam_wc_pv_usercan` authorization filters*
Metadata
| Field | Value |
|---|---|
| Article type | Recipe |
| Plugin slug | mam-woocommerce-product-vendors |
| Applies to plugin version | 26.19.1+ |
| Category | Building Your App |
| Audience | Site admin, app builder |
| Last verified | 2026-06-10 |
