Skip to content

User Profile

Displays details of the currently logged-in customer, showing account information like name, email, and profile data. This block provides a read-only view of customer information for use in account dashboards and profile pages.

  • Parent block: None (standalone block)
  • BigCommerce data: Customer profile data from BigCommerce
  • Authentication: Customer must be logged in to see data
  • settingsId (string) - Settings configuration identifier
    • Default: ""
  • HTML editing: Not supported

This block can be placed on any page or template where you want to display the logged-in customer’s profile information. It’s commonly used in account dashboards, profile pages, or personalized content areas.

[Account Dashboard]
→ User Profile ← (Profile summary)
Welcome back, John Smith!
Email: john@example.com
Customer since: Jan 2026
Account Menu
Account Orders
Account Details
[My Profile Page]
→ User Profile ← (Full profile display)
Name: John Smith
Email: john@example.com
Phone: (555) 123-4567
Account Status: Active
[Edit Profile Button] → Links to Account Details block
[Homepage - Logged-in View]
→ User Profile ← (Greeting banner)
Welcome back, John! 👋
[View My Orders] [My Account]

Configure which customer information to display:

  • Customer name (first name, last name, or full name)
  • Email address
  • Phone number
  • Account creation date
  • Customer group or tier
  • Custom profile fields from BigCommerce

Add custom CSS to style the profile display:

  • Profile card layout
  • Typography and spacing
  • Color scheme
  • Responsive design for mobile
  • Icons or avatars
  • Status badges

Example CSS targets:

.wp-block-wpe-mustang-user-profile {
/* Profile container */
}
.user-profile__name {
/* Customer name */
}
.user-profile__email {
/* Email display */
}
.user-profile__meta {
/* Additional info like account age */
}

The block includes a viewScript for client-side interactivity:

  • Dynamic content updates based on login state
  • Conditional rendering of profile fields
  • Integration with customer session management
  • Real-time reflection of authentication status

The block includes editor-specific styling (index.css) for the block interface.

The User Profile block communicates with BigCommerce’s Customers API to:

  • Retrieve current customer profile data for the authenticated user
  • Display customer information (name, email, phone, etc.)
  • Show read-only profile fields
  • Reflect customer tier or group status

All customer profile data is managed in BigCommerce. When the block loads:

  1. Customer authentication is verified via WordPress® session
  2. API request is made to BigCommerce for customer profile
  3. Customer data is returned (name, email, phone, etc.)
  4. Data is displayed in WordPress® UI as read-only fields
  5. If customer is not logged in, block shows login prompt or is hidden

Customer information is NOT stored in WordPress® - it’s pulled from BigCommerce in real-time to ensure accuracy.

This block requires an active customer session. When used on a page:

  • Logged-in customers see their profile information
  • Anonymous visitors see nothing (block is hidden) OR a login prompt
  • Configure behavior in block settings:
    • Hide completely when logged out
    • Show “Please log in” message
    • Redirect to login page

The User Profile block can:

  • Stand alone on any page or template
  • Work alongside other account blocks (Account Details, Orders, Addresses)
  • Display in headers, sidebars, or page content
  • Integrate with personalization strategies

Unlike the Account Details block (which allows editing), User Profile is display-only. Direct customers to Account Details for profile updates.

Profile not displaying for logged-in customer

Section titled “Profile not displaying for logged-in customer”
  • Verify the customer is logged in (check session cookie)
  • Check that BigCommerce API connection is active
  • Review browser console for API errors
  • Ensure customer account exists in BigCommerce
  • Check that customer profile is complete in BigCommerce admin
  • Verify API permissions include customer data read access
  • Review API response for missing fields
  • Ensure customer record exists in BigCommerce
  • Verify caching is not preventing fresh data from loading
  • Clear any WordPress® or CDN caching
  • Check that BigCommerce data is current in admin
  • Review API response timestamps
  • Check block settings for login requirement enforcement
  • Verify authentication check is working correctly
  • Review conditional rendering logic
  • Test in incognito/private browsing mode
  • CRITICAL SECURITY ISSUE - Report immediately
  • Verify authentication token is being validated correctly
  • Check that customer ID is properly scoped to authenticated user
  • Review API request parameters for customer filtering
  • Test with multiple customer accounts

Block appears but shows loading state indefinitely

Section titled “Block appears but shows loading state indefinitely”
  • Check for JavaScript errors in browser console
  • Verify API request is completing successfully
  • Review network requests for failed API calls
  • Check for timeout or rate limiting issues
  • Ensure customer session token is valid
  • Verify CSS selector specificity is sufficient
  • Check that custom styles are loading after block styles
  • Review browser inspector for CSS conflicts
  • Test with browser cache disabled
  • Account Details - Allows customers to edit their profile information
  • Account Orders - Displays customer order history
  • Account Login - Customer authentication form
  • Account - Parent container for account-related blocks