Dear MarketKing Team,
I would like to kindly suggest an improvement regarding the staff management functionality in MarketKing.
Background
At present, when a vendor deletes a staff member via the staff management screen,
wp_delete_user($team_member_id) is called, which physically deletes the entire WordPress user account.
This behavior goes beyond the original intent of simply removing the staff member from the store team, and it also affects the user’s rights as a regular customer of the site (such as receiving orders, accessing downloads, and managing subscriptions).
For example, if a customer places an order and is later deleted as a user, they would no longer be able to access their purchase, which could easily lead to complaints or operational issues.
Suggested Improvement
We would kindly request the addition of an option in MarketKing > Settings:
“Allow staff deletion” (ON/OFF)
-
ON: Current behavior (staff deleted as WordPress users)
-
OFF: Instead of deletion, staff status is switched (Approved ⇄ Hold → Deregistered)
Ideally, this should be a settings option, but at minimum, it would already be very useful if this behavior could be controlled via a filter hook (ON/OFF).
Staff Status Management (when “Allow staff deletion” = OFF)
We believe it would be beneficial if staff accounts could also be managed with the same key as vendors:
marketking_account_approved, along with an additional dedicated flag for staff applications:
marketking_staff_application_pending.
Proposed Staff States:
-
Approved staff (when vendor registers staff)
-
marketking_staff_application_pending = no
-
marketking_account_approved = yes
-
On hold (temporarily suspended by vendor, e.g. long-term leave; still part of the vendor’s team)
-
marketking_staff_application_pending = no
-
marketking_account_approved = pending
-
Deregistered (store affiliation removed; no longer part of the team, but historical record is preserved)
-
marketking_staff_application_pending = no
-
marketking_account_approved = no
-
parent_vendor = vendor_id (kept for audit trail)
Notes:
-
For deregistered staff, we suggest keeping the parent_vendor value (instead of clearing it) so it is clear from which vendor the user was removed.
-
Current team queries should always be filtered with marketking_account_approved = (yes or pending).
-
For vendors, the existing marketking_vendor_application_pending continues unchanged.
Staff Login Control
If “Allow staff deletion” is set to OFF, add a login check for staff accounts in the vendor dashboard:
-
Only yes (Approved) staff may log in
-
pending (Hold) and no (Deregistered) staff should not be able to log in
Supplementary Points
-
Consistency with vendor approval
MarketKing core already includes a vendor approval system. Using similar keys for staff ensures consistency and provides a solid foundation for future extensions in account management. -
Preserving audit trails
Physically deleting WordPress users removes all historical data, making post-incident investigation difficult. By controlling status instead, accounts are preserved while access is restricted. -
Minimal impact on existing sites
By default, the current behavior (user deletion) remains unchanged.
The new status workflow (Approved ⇄ Hold → Deregistered) will only apply if the admin changes the setting, ensuring backward compatibility.
We believe this improvement would be valuable for other users as well, and we are confident it will enhance both the reliability and flexibility of staff management in MarketKing.
We would be very grateful if you could kindly consider this request.
Best regards,