Skip to content

WooCommerce Integration

Advanced Username Manager integrates seamlessly with WooCommerce, adding a dedicated “Change Username” tab in the My Account page. This allows your customers to manage their login usernames directly from their WooCommerce account dashboard.

The WooCommerce integration adds a “Change Username” tab to the WooCommerce My Account navigation menu. Customers can access this feature alongside other account management options like Orders, Downloads, and Account Details.

Compatible With:

  • WooCommerce 4.0 or higher
  • My Account Integration - Username change tab appears naturally in WooCommerce My Account menu
  • Customer-Friendly - Works entirely from the frontend, no admin access needed
  • Consistent Navigation - Follows WooCommerce’s standard account navigation pattern
  • Seamless Experience - Uses WooCommerce’s styling and layout
  • Role Support - Works with WooCommerce Customer role and other user roles
  • Security - Same security features as other account management functions
  1. Go to PluginsInstalled Plugins
  2. Ensure WooCommerce is Active
  3. Verify WooCommerce is properly configured

WooCommerce Active Ensure WooCommerce is installed and activated

Step 2: Enable Username Change in WooCommerce

Section titled “Step 2: Enable Username Change in WooCommerce”
  1. Navigate to WB PluginsAdvanced Username Manager
  2. Click the General Settings tab
  3. Find the option “Enable Username Change in WooCommerce”
  4. Toggle the switch to ON (green)
  5. Click Save Changes

Enable WooCommerce Integration Enable the username change tab in WooCommerce My Account

  1. On the same General Settings page, find “Select User Role(s)”
  2. Select the Customer role (and any other roles you want to allow)
  3. Configure cooldown period and username length requirements
  4. Click Save Changes

Configure Customer Role Ensure the Customer role is selected

See the General Settings documentation for detailed configuration instructions.

Customers access the username change feature through their WooCommerce account:

  1. Log in to the site
  2. Navigate to My Account page (usually at /my-account/)
  3. Click Change Username in the navigation menu
  4. The username change form appears

WooCommerce My Account Navigation Change Username tab appears in My Account menu

The “Change Username” tab is automatically inserted in the My Account menu right after the “Account Details” option, making it easy to find.

Default Menu Order:

  1. Dashboard
  2. Orders
  3. Downloads
  4. Addresses
  5. Account Details
  6. Change Username ← Added here
  7. Logout

URL Structure:

https://example.com/my-account/change-username/

When customers click the Change Username tab, they see a dedicated page:

Username Change Page in WooCommerce The username change page in WooCommerce My Account

  1. Page Heading - “Change username” (matches WooCommerce styling)
  2. Username Change Form - The complete form with all features
  3. WooCommerce Layout - Uses standard My Account page layout
  4. Responsive Design - Works on mobile, tablet, and desktop

The form includes all the same features as the shortcode and BuddyPress versions:

WooCommerce Username Form The username change form in WooCommerce

Form Elements:

  • Current Username - Read-only field showing current login name
  • New Username - Input field for desired username
  • Real-Time Validation - Instant feedback on username availability
  • Username Suggestions - Alternative options if username is taken
  • Save Changes Button - Submit the username change

See the Username Availability documentation for details on how validation works.

Step 1: Access My Account

Access My Account Customer navigates to My Account page

  1. Log in to the website
  2. Click My Account in the header/menu
  3. Or go directly to /my-account/

Step 2: Click Change Username

Click Change Username Click the Change Username menu item

  1. Find Change Username in the left navigation menu
  2. Click on it to open the username change page

Step 3: Enter New Username

Enter New Username Type desired username

  1. The current username is displayed (read-only)
  2. Click in the New Username field
  3. Type the desired new username
  4. Watch for real-time availability feedback

Step 4: Validate and Save

Validate Username System validates the username

  1. Ensure username is available (green checkmark)
  2. Check that it meets length requirements
  3. Click Save Changes button
  4. Wait for confirmation

Step 5: Success

Success Message Success message confirms the change

  1. Success message appears: “Username has been changed successfully!”
  2. Customer receives a confirmation email
  3. Customer stays logged in with new credentials
  4. Cooldown period begins

After changing their username, customers receive an email:

Subject:

“Your Username Has Been Successfully Updated!”

Email Content:

Hello John,

We’re writing to let you know that your username on Example Store has been successfully updated.

Your new username is: john_customer_2026

If you did not request this change, please contact our support team immediately to secure your account.

Thank you for being part of Example Store!

Customers can customize this email using filter hooks. See the developer documentation for details.

The plugin automatically adapts to your WooCommerce theme’s styling:

  • Matches My Account Layout - Uses WooCommerce’s standard account page structure
  • Responsive Design - Works on all device sizes
  • Theme Compatibility - Inherits styling from your active WooCommerce theme
  • Consistent Buttons - Save Changes button matches WooCommerce button styles
  • Form Fields - Input fields use WooCommerce form styling

If you need to customize the appearance, you can add custom CSS:

/* Style the WooCommerce username change form */
.woocommerce-MyAccount-content h3 {
/* Heading styles */
}
.woocommerce-MyAccount-content .aum-standard-form {
/* Form container styles */
}
.woocommerce-MyAccount-content .aum-input-field {
/* Input field container styles */
}

Add these styles to AppearanceCustomizeAdditional CSS or your child theme’s stylesheet.

The WooCommerce integration works perfectly with the WooCommerce Customer role:

  • Default WooCommerce Role - Automatically assigned when someone creates a WooCommerce account
  • Shop Permissions - Can view products, place orders, and manage their account
  • Limited Admin Access - Cannot access WordPress admin dashboard

To allow WooCommerce customers to change their usernames:

  1. Go to General Settings
  2. Under “Select User Role(s)”, choose Customer
  3. Click Save Changes

Select Customer Role Select the Customer role to allow username changes

Now all WooCommerce customers can change their usernames from My Account.

Scenario 1: Online Store with Customer Accounts

Section titled “Scenario 1: Online Store with Customer Accounts”

Use Case: E-commerce store where customers create accounts to track orders

Configuration:

  • Enable WooCommerce username changes
  • Allow Customer and Subscriber roles
  • Use 15-day cooldown for balance
  • Standard length limits (5-12 characters)
  • Send email confirmations

Benefits:

  • Customers can update their account information
  • Improves customer satisfaction
  • Reduces support requests about usernames

Use Case: WooCommerce store selling memberships or subscriptions

Configuration:

  • Enable WooCommerce username changes
  • Allow Customer role and any custom membership roles
  • Use 30-day cooldown to prevent frequent changes
  • Minimum 6 characters for professionalism

Benefits:

  • Members feel in control of their accounts
  • Professional account management experience
  • Stable usernames for membership tracking

Use Case: Store with customers, wholesale buyers, and affiliates

Configuration:

  • Enable WooCommerce username changes
  • Select Customer, Wholesale Customer, and Affiliate roles
  • Use 15-day cooldown
  • Set role-specific restrictions if needed

Benefits:

  • All user types can manage their usernames
  • Flexibility for different account types
  • Unified account management experience

When customers change their username through WooCommerce, they automatically stay logged in:

  1. Customer submits username change
  2. Plugin updates the username in the database
  3. Plugin clears old authentication cookies
  4. Plugin sets new authentication cookies with new username
  5. Customer remains logged in seamlessly

The plugin preserves the “Remember Me” functionality:

  • If customer had “Remember Me” checked, it’s preserved
  • Session duration remains the same
  • No need to log in again
  • Seamless customer experience
  • No interruption to shopping or browsing
  • Customers can continue to checkout
  • Reduces friction and confusion

The cooldown period applies to WooCommerce customers just like other users:

If a customer tries to change their username before the cooldown expires:

WooCommerce Cooldown Message Cooldown message in WooCommerce My Account

Message Displayed:

“You have already updated your username. You can change it again after February 22, 2026.”

Set the cooldown period in General Settings:

  • 7 Days - Once per week
  • 15 Days - Twice per month
  • 30 Days - Once per month

See General Settings for configuration details.

The plugin automatically registers a rewrite endpoint for the “Change Username” page:

The endpoint change-username is registered with WordPress rewrite rules:

add_rewrite_endpoint( 'change-username', EP_PAGES );

If the “Change Username” page shows a 404 error:

  1. Go to SettingsPermalinks
  2. Click Save Changes (don’t change anything)
  3. This flushes the rewrite rules
  4. Try accessing the page again

The endpoint works with any WordPress permalink structure:

  • Plain: ?page_id=123&change-username
  • Post Name: /my-account/change-username/
  • Custom: Works with any structure

The WooCommerce integration includes the same security features as other parts of the plugin:

  • Every form submission includes a WordPress nonce token
  • Prevents CSRF (Cross-Site Request Forgery) attacks
  • Validates requests are from authentic forms
  • Only users with allowed roles can change usernames
  • Customers can only change their own username
  • Administrators can change any username
  • All usernames are sanitized before processing
  • Prevents SQL injection and XSS attacks
  • Validates against WordPress username rules
  • Cooldown period prevents abuse
  • Stops rapid username changes
  • Protects against malicious behavior

Problem: The tab doesn’t appear in My Account menu.

Solution:

  1. Verify WooCommerce is active
  2. Check that “Enable Username Change in WooCommerce” is enabled in General Settings
  3. Ensure the Customer role is selected in “Select User Role(s)”
  4. Go to SettingsPermalinks and click Save Changes
  5. Clear site cache
  6. Log out and log back in

Problem: Clicking “Change Username” shows a 404 page not found error.

Solution:

  1. Go to SettingsPermalinks
  2. Click Save Changes without changing anything (flushes rewrite rules)
  3. Clear all caches
  4. Try accessing the page again
  5. Deactivate and reactivate the plugin if issue persists

Problem: Page loads but form doesn’t appear.

Solution:

  1. Check if you’re logged in
  2. Verify your user role has permission
  3. Check for JavaScript errors in browser console
  4. Disable conflicting plugins
  5. Test with a default WordPress theme

Problem: Can’t click Save Changes or nothing happens.

Solution:

  1. Check browser console for JavaScript errors
  2. Ensure username meets validation requirements
  3. Verify username is available
  4. Disable browser extensions
  5. Try a different browser

Problem: Form appears unstyled or doesn’t match WooCommerce.

Solution:

  1. Clear browser cache
  2. Clear site cache
  3. Check if WooCommerce styles are loading
  4. Verify no CSS conflicts with your theme
  5. Try disabling customizer plugins temporarily

After enabling WooCommerce integration, test these scenarios:

  • “Change Username” tab appears in My Account menu
  • Tab is positioned after Account Details
  • Clicking tab loads the username change page
  • Form displays correctly with WooCommerce styling
  • Current username shows correctly
  • Real-time availability check works
  • Can successfully change username
  • Receive email confirmation
  • Stay logged in after change
  • Can continue shopping/checkout
  • Cooldown prevents immediate second change
  • Works on mobile devices

Create a test WooCommerce customer account:

  1. Register as a new customer
  2. Place a test order (optional)
  3. Log in and access My Account
  4. Test changing the username
  5. Verify all features work correctly