Skip to main content

User Roles and Permissions

Scottsdale Mint uses a multi-tier role system combining WordPress's built-in roles, WooCommerce roles, and custom roles specific to the site's business requirements.


Default WordPress Rolesโ€‹

RoleDescription
administratorFull access to WordPress and WooCommerce admin; 2FA mandatory
editorCan manage pages and posts; limited WooCommerce access
authorCan publish own posts
contributorCan write but not publish
subscriberCustomer-level access; can log in and view My Account

WooCommerce Rolesโ€‹

RoleKey Capabilities
shop_managerWooCommerce full access (orders, products, settings); 2FA mandatory
customerDefault registered customer role; can place orders, track, and manage account

Custom Rolesโ€‹

dealerโ€‹

PropertyValue
Registered bysuma-elementor theme or a custom plugin
PurposeWholesale/dealer customers who receive tiered pricing
Key differencesSee dealer-tier prices instead of retail prices; may have volume discount overrides
AccessSame as customer role for WooCommerce; pricing logic checks for this role

compliance_officerโ€‹

PropertyValue
Registered byCustom roles setup (in theme or dedicated plugin)
PurposeReview KYC documents and approve/reject KYC-pending orders
Key capabilitiesCan view restricted S3 KYC document links; can change wc-kyc-pending order status; cannot manage products or settings
AccessLimited WooCommerce admin โ€” orders only

warehouse_managerโ€‹

PropertyValue
Registered byCustom roles setup
PurposeWarehouse team โ€” view and ship orders
Key capabilitiesCan view orders; can add tracking numbers; cannot modify prices or settings

Role-Capability Matrixโ€‹

Capabilityadminshop_managercompliance_officerwarehouse_managerdealercustomer
Manage productsโœ…โœ…โŒโŒโŒโŒ
Manage ordersโœ…โœ…โœ… (limited)โœ… (limited)โŒโŒ
Add tracking numbersโœ…โœ…โŒโœ…โŒโŒ
View KYC documentsโœ…โŒโœ…โŒโŒโŒ
WooCommerce settingsโœ…โœ…โŒโŒโŒโŒ
WordPress settingsโœ…โŒโŒโŒโŒโŒ
Place ordersโœ…โœ…โœ…โœ…โœ…โœ…
Dealer pricingโŒโŒโŒโŒโœ…โŒ
View own ordersโœ…โœ…โœ…โœ…โœ…โœ…

Dealer Pricing Logicโ€‹

The dealer role enables tiered pricing on the front-end:

// In \Suma\Product\Pricing
public function get_customer_discount_tier(): string {
if ( ! is_user_logged_in() ) {
return 'retail';
}

$user = wp_get_current_user();

if ( in_array( 'dealer', $user->roles, true ) ) {
return 'dealer';
}

return 'retail';
}

Dealer pricing rates are configured in the WooCommerce product editor or in a global discount settings page.


2FA by Roleโ€‹

The WP 2FA Premium plugin enforces 2FA based on role:

Role2FA Required
administratorYes โ€” cannot skip
shop_managerYes โ€” cannot skip
compliance_officerYes โ€” cannot skip
warehouse_managerRecommended (configurable)
dealerOptional
customerOptional

Managing Rolesโ€‹

Roles can be managed via:

  1. WP Admin โ†’ Users โ†’ Edit User โ€” change role per user
  2. WP-CLI:
    wp user update 42 --role=dealer
  3. Custom roles are registered in code โ€” they persist across environments via the database but are registered by register_activation_hook or init action in the plugin/theme