Configure account types and permissions
MyListing’s Accounts & Roles screen configures up to two front-end customer account types. It is not a general WordPress role editor and does not grant staff access to wp-admin.
Understand the two account types
Section titled “Understand the two account types”Go to Theme Tools → User Roles, then find the User Roles & Permissions section.
- Main Account Type uses WooCommerce’s
customerrole. Its default label is Customer, Can add listings is enabled, and Can switch role is disabled. - Alternate Account Type uses MyListing’s
customer_altrole. It is disabled by default, has no default public label, and both permissions are disabled by default.
MyListing also assigns the main account type’s custom capabilities to legacy users with the WordPress subscriber role. When the alternate account type is disabled, its database role is retained for compatibility but removed from the runtime role list; existing data is not deleted.
- Enable Enable alternate account type only if the site needs two genuinely different customer paths, such as Business and Private User.
- Set a clear Role name for each type. These labels appear during registration and elsewhere in the account UI.
- Configure Can add listings and Can switch role independently for each type.
- Configure and order the role’s registration/profile fields.
- Set Default account type near the top of the page.
- Select Save settings, then register and test one account of each type.
What Can add listings controls
Section titled “What Can add listings controls”For customer, subscriber, and alternate-customer users, Can add listings maps to MyListing’s mylisting_can_add_listings capability. When disabled:
- the Add Listing widget shows that the user cannot add listings, or prompts them to switch to the other account type when that is permitted;
- My Listings and Promotions are removed from the My account navigation;
- the account dashboard uses a simpler WooCommerce-oriented summary instead of MyListing listing statistics.
It does not remove Bookmarks, WooCommerce Orders, Downloads, Addresses, Payment methods, or Account details. It also does not control My Products when Enable Simple Products is active; that feature is available to signed-in members independently of the listing permission.
Disabling the permission does not delete listings the user already owns. Review existing ownership and any direct edit links when changing a live site’s role policy.
Configure role switching
Section titled “Configure role switching”Can switch role governs whether users of that account type see an Account type panel under My Account → Account details. The action is protected by a WordPress nonce and switches between customer/legacy subscriber and customer_alt.
Switching preserves the WordPress user, content ownership, orders, listings, and saved profile metadata. It changes which role-specific fields and listing permissions are active. If the destination account type has Can switch role disabled, the confirmation warns that the change is irreversible from the front end. An administrator can still correct the user’s role in wp-admin.
For two-way self-service switching, enable Can switch role on both account types. For a one-way upgrade path, enable it only on the source type after confirming that the destination role has the required fields and permissions.
Test these cases before exposing switching:
- a user with existing listings switches to a role that cannot add listings;
- a required profile field exists only on the destination role;
- a user switches back, when allowed;
- cached account navigation refreshes after the change;
- membership, vendor, or role-management plugins do not overwrite
customer_alt.
Dashboard endpoints and fallbacks
Section titled “Dashboard endpoints and fallbacks”MyListing sorts its account entries ahead of WooCommerce’s default entries:
- My Account
- My Listings
- Promotions
- Bookmarks
- My Products, only when simple products are enabled
WooCommerce’s standard endpoints follow at their normal order. Claim Requests and Add a Product are registered endpoints reached from other screens rather than menu entries. Endpoint slugs are translatable, so do not hard-code account URLs in custom templates; use WooCommerce endpoint helpers.
If a role cannot add listings, MyListing loads its alternate dashboard template and removes My Listings and Promotions from the menu. If an endpoint returns 404 after changing themes, translations, or endpoint code, save Settings → Permalinks once to refresh rewrite rules.
Security and maintenance guidance
Section titled “Security and maintenance guidance”- Access to Theme Tools → User Roles and its save handler requires the WordPress Administrator role in the current implementation. Limit administrator accounts and protect them with strong authentication.
- Do not rename, delete, or repurpose
customer_altwith another role plugin while it is in use. - Do not assign Editor, Shop Manager, or Administrator merely to let a user submit listings. Use Can add listings for that purpose.
- Check the destination role before enabling one-way switching. The front end cannot switch back when that role’s Can switch role setting is off.
- Back up the database before bulk-changing roles. MyListing has no bulk migration screen for transforming profile-field data between the two configurations.
- After adding a membership, multivendor, security, or role editor plugin, test registration, login, role switching, Add Listing, My Listings, My Products, Orders, and direct wp-admin access with a non-admin test account.
Developers can query the effective MyListing checks through MyListing\Src\User_Roles\user_can_add_listings() and MyListing\Src\User_Roles\user_can_switch_role(). Prefer these helpers over comparing public role labels, which administrators can rename and translations can change.
Next: Choose a map and geocoding provider →
