Customer Accounts
BoxCart uses guest checkout by default: customers can place an order without creating an account. Sign-in, lost-password, and password-reset all run through WordPress's native authentication flow, styled to match your storefront. Accounts are optional and opt-in.
Overview
Every checkout is a guest checkout by default. The customer enters their name, email and phone: no password, no account creation step. Their order is confirmed and they receive a confirmation email containing a per-order magic link they can use to view the order any time later, even months later, without an account.
If you enable account creation, the order-confirmation page also offers an opt-in "Create an account" button. Account creation uses WordPress core's wp_create_user() and emails the customer a branded "set your password" link - they never type a password into BoxCart's UI. Returning customers sign in with a BoxCart-styled form on the account page or right on the checkout page. Since 1.7.0 the form posts to that same page, where BoxCart signs the customer in with WordPress core's wp_signon(), so security plugins (lockouts, CAPTCHAs, two-step sign-in) still apply and customers never land on the WordPress login screen, even when it's hidden, moved or blocked by your host. See Security plugins.
Customer accounts use a custom boxcart_customer WordPress role with minimal capabilities (read only). The role is created automatically on plugin activation and verified on every page load via ensure_customer_role(). The entire account experience is frontend-only: customers are redirected away from the WordPress admin area, and the admin bar is hidden when they're viewing the site. Staff with other roles aren't affected (see Account Settings and Shop staff).
Account features include:
- Guest checkout (no account needed)
- Per-order magic-link order viewing for guests
- Optional post-purchase account creation
- BoxCart-styled sign-in on the account page and the checkout page, on your shop's own pages (core
wp_signon()) - BoxCart-styled lost-password and password-reset (uses WordPress's native
retrieve_password()andreset_password()) - Dashboard with order history
- Edit personal details and change password
- Automatic linking of past guest orders to the account (matched by email, once the address is confirmed)
- Pro: One-click reorder from past orders
- Pro: Product favourites
- Pro: Customer-side order modification window
- Pro: Two-way order messaging
The Account page is optional: BoxCart works as guest-checkout-only without it. If you want customers to be able to sign in and view past orders, create a page with the [boxcart_account] shortcode (or the BoxCart Account block) and assign it under BoxCart → Settings → General → Page Setup. The one shortcode handles sign-in, lost-password, and password-reset: no extra pages required.
Guest checkout
Guest checkout is BoxCart's default mode. The customer fills in the checkout form, places the order, and is done. The order is created with no customer_id attached: only the customer's name, email and phone are stored on the order row itself. A 32-character random view token is generated with wp_generate_password() and stored alongside the order; the customer's confirmation email includes a magic-link URL containing this token (e.g. https://yoursite.com/checkout/?boxcart_order=BC-…&token=…) that lets them view the order any time without signing in.
Tokens don't expire and aren't tied to a login session: they're per-order, single-purpose, and constant-time compared on verification. If the same customer later creates an account using the same email, BoxCart links all matching guest orders to the account once it knows the address is theirs: when they set or reset their password from an emailed link, confirm an email change, have it confirmed on their WordPress profile screen, or when you create or edit the account in wp-admin. Accounts that existed before 1.6.0 count as confirmed. An account made some other way with a typed-in password (another plugin's sign-up form, say) picks up guest orders after the customer resets their password once.
An order placed while signed in, but with a different email address (a phone order you take while signed in as yourself, say), is a guest order for that email, and shows in the account of whoever owns it.
Returning customers at checkout. When customer accounts are turned on (BoxCart → Settings → Accounts) and the customer isn't signed in, the checkout shows "Returning customer? Sign in to fill the form automatically". The link opens a sign-in form in place, above the checkout. Like the account page's form, it signs the customer in on the checkout page itself, and brings the customer straight back to the checkout, signed in, with the basket and the collection slot they picked still selected. A wrong password brings them back to the checkout with the form open and a message, rather than to the WordPress login screen.
Checkout doesn't ask for a billing address: orders are collected, and Stripe's card form asks for the postcode it needs. Developers can bring the billing address fields back with the boxcart_checkout_ask_billing_address filter (see Hooks & Filters).
Optional account creation
If you enable account creation under BoxCart → Settings → Accounts, the order-confirmation page shows a "Create an account" button below the order details. When the customer clicks it, a modal asks for confirmation and submits to the boxcart_post_purchase_signup AJAX endpoint.
The endpoint verifies the customer's view-token (proof they own the order), checks per-IP rate limits (5 signups per hour), and then calls WordPress core's wp_create_user() with a strong random password. A BoxCart-branded "set your password" email is sent using WordPress's standard password-reset key flow: the customer follows the link and chooses their own password. BoxCart never sets a password or auth cookie at signup time.
All accounts created this way are assigned the boxcart_customer role, which grants only the read capability. This replaces the site's New User Default Role (Settings → General) rather than adding to it, so customers always get the Customer role whatever that setting is. If any existing customer accounts also have more access than a customer needs, BoxCart points them out in a notice on its own screens, the Users screen and the Dashboard, with a link to review them. On plugin uninstall, these users are reassigned to the subscriber role before the custom role is removed.
The button works for an order that has been placed; for a card order, once it has been paid.
If the customer's email already matches an existing WordPress user, the signup endpoint declines politely and directs them to sign in instead. On their next sign-in the order is linked to the account (and any other matching guest orders), as described above.
New in 1.2: register before ordering. As well as the post-purchase signup above, you can let customers create an account up front. Enable "Let customers register before ordering" under BoxCart → Settings → Accounts and a branded registration form appears on your account page (?action=register). Registration runs entirely through WordPress core's register_new_user(), called on your account page (since 1.7.0; before, the form posted to wp-login.php): BoxCart derives a unique username from the email address and lets core send the standard "set your password" email, so it never captures or sets a password itself. Accounts made this way get the boxcart_customer role, like accounts made after checkout. Turning this option on also enables WordPress's users_can_register setting; turning it off again switches that back off, but only if BoxCart was the one that switched it on.
Members-only pricing (Pro)
Members-only pricing hides your prices and the "add to basket" button from logged-out visitors. They can still browse your whole catalogue, but in place of each price they see your "log in to see prices" message and a button that takes them to your account page to sign in or register. Once they log in, the normal store returns: prices, quantity options and checkout all work as usual. It's ideal for wholesale, trade, and members-only shops.
To turn it on, go to BoxCart → Settings → Accounts and enable Members-Only Pricing. You can set a custom logged-out message (shown in place of the price); leave it blank to use the default. Because it's a login-gated feature, it works best with customer accounts and up-front registration enabled and a My Account page assigned, so visitors have somewhere to sign in or register.
The gate is enforced server-side on every request: prices are never sent to a logged-out browser, and the product grid, search results, and the add-to-basket and place-order endpoints all respect it, so it holds up even behind full-page caching. Logged-out visitors are always shown the card storefront (the table view is a signed-in experience).
Login and Dashboard
When a customer is not logged in, the account page displays login and (optionally) registration forms. After logging in, customers are shown the account dashboard by default.
The account page uses the ?view= query parameter to switch between different views:
| View Parameter | Page Displayed |
|---|---|
(none) | Account dashboard (includes favourites, quick links, and recent orders) |
orders | Order history |
order (with ?order=) | Single order view |
edit | Edit details and change password |
For example, to view order history a customer would visit:
https://yoursite.com/account/?view=orders
And to view a specific order (by order number):
https://yoursite.com/account/?view=order&order=BC-20260420-001
The dashboard provides quick links to each section, giving customers an at-a-glance overview of their account. Logged-in customers also benefit from pre-filled checkout details (name, email, phone) drawn from their account profile.
Order History
The order history view (?view=orders) displays a list of the customer's past orders, showing key details such as:
- Order number
- Date placed
- Order status
- Total amount
Clicking an order number or View opens the order in a window with its full details: items, quantities, collection slot, payment method and order notes. Once money has moved since the order was placed (a refund, or a change that left something to pay), the window also shows what's been paid, refunded and is left to pay.
On BoxCart Pro, each order also includes a "Reorder" button. When clicked, all items from that order are added to the customer's current basket, making it easy to repeat a previous order. This button is not shown on the free build.
Quick reorder is a great time-saver for repeat customers on Pro. When a customer clicks Reorder, items are added to their basket and they can proceed straight to checkout.
Order Modifications (Pro)
On BoxCart Pro, customers with an account can modify pending orders within a configurable time window after placing them. By default, modifications are allowed within 24 hours of the order being placed (1 to 48 hours). Since 1.6.0 you can instead choose Until the order cut-off for the collection, so an order placed a week ahead can be changed right up to when ordering closes for its collection (for example 1pm the day before). Either way, changes always close at the order cut-off for the order's collection slot.
Customers are told until when they can make changes. With the cut-off choice, the order page and order window say "You can change this order until 1:00 pm on Sunday 20 December." With the hours choice they say how long is left ("for 23 hours 10 minutes"). The order confirmation email always gives the closing time, as it may be read later. If your terms mention a time limit for changes, check they still match.
When order modifications are enabled, a "Modify Order" button appears in the order window (opened from the account dashboard or order history), and on the single order view (?view=order&order=), for eligible orders. Customers can modify the following aspects of their order:
- Items: adjust quantities of existing order items, in each product's own steps (for example 0.5 kg at a time) between its minimum and maximum. On an order paid by card, a lower total is refunded to the card and a higher total is left to pay at collection (see Changes to paid orders). If a product's price has changed since the order was placed, the units already ordered keep the price paid and extra units cost today's price; taking units off removes the most recently added first (see Price changes). The order window then notes it: "Price changed: now £1.40 (you paid £1.20). Extra items are charged at £1.40." Orders paid any other way keep their items locked: the customer sees a note asking them to contact you.
- Collection slot: change the selected collection slot
- Notes: update or add order notes
Each of these modification types can be individually enabled or disabled by the admin. Changes are saved via AJAX, and both the customer and the admin receive email notifications when an order is modified.
Customers who checked out as guests
Order changes are for customers with an account. The link in a guest's confirmation email lets them view their order, not change it. While the order can still be changed, the order page tells them that customers with an account can change it, and until when, with a Create an account button (which opens the same account offer the page shows after ordering). If that email address already has an account, it says to sign in instead. Creating the account puts the order in it straight away, so they can change it there.
If customer accounts are switched off, only customers who already have an account can change their orders; the Order Modifications settings say so.
After a change to an order paid by card, the order shows what the customer has paid and anything left to pay when they collect.
The following settings control order modifications, available under BoxCart → Settings → Accounts:
| Setting | Key | Default | Description |
|---|---|---|---|
| Allow order modifications | allow_order_modifications |
Off | Enable or disable the ability for customers to modify their orders. |
| Modification window | modification_window_mode |
Hours | hours: for a number of hours after placing the order (below). cutoff: until the order cut-off for the collection. Added in 1.6.0. |
| Modification window (hours) | modification_window_hours |
24 | Number of hours (1 to 48) after placing an order during which modifications are allowed, when the window is set to hours. |
| Allow item modifications | modify_items |
On | Allow customers to adjust item quantities on their orders. |
| Let customers change items on orders paid by card | modify_paid_orders |
On | Allow item changes on orders paid by card. A lower total is refunded to the card through Stripe; a higher total marks the order Part paid, with the rest to pay at collection. Added in 1.5.0. |
| Allow slot modifications | modify_slot |
On | Allow customers to change the collection slot on their orders. |
| Allow note modifications | modify_notes |
On | Allow customers to update or add notes to their orders. |
| Allowed statuses | modification_allowed_statuses |
Pending, Processing | Order statuses for which modifications are permitted. |
Order modifications reduce the need for customers to cancel and re-place orders. Set the modification window to a value that gives customers enough time to make changes without impacting your preparation schedule.
Order Messaging
BoxCart includes a two-way messaging system that allows customers to communicate with the shop about their orders. When enabled, a message thread appears below the order details in the order window.
Key features of order messaging:
- Customer messages - customers can send messages to the shop directly from their order detail view. A message can be up to 2,000 characters, and a customer can send up to 10 an hour about one order (each one emails the shop).
- Admin replies - the admin can reply to customer messages from the order view in the BoxCart admin area, creating a two-way conversation thread.
- Threaded display - all messages are displayed in chronological order below the order details, showing the sender and timestamp for each message.
Order messaging is controlled by the order_messaging_enabled setting, available under BoxCart → Settings → Accounts. When disabled, the messaging thread and input are hidden from the order view.
Edit Details
The edit details view (?view=edit) allows customers to update their personal information:
- First name and last name
- Email address
- Phone number
Changes are saved via the boxcart_update_account AJAX endpoint. All input is sanitised using sanitize_text_field() and sanitize_email().
Changing the email address asks for the customer's current password. The new address takes effect when the customer clicks a link sent to it, while signed in to the same account; the link lasts 24 hours, and an account can ask for up to 3 of these emails an hour. Until then the page shows the change as waiting. WordPress also lets the old address know the email has changed.
The edit details view also includes a change password section, where the customer can enter their current password and set a new one. This is handled by the boxcart_change_password AJAX endpoint. After 5 wrong current passwords in a row (password and email changes count together), the account waits 15 minutes before trying again.
Lost password and reset
BoxCart's lost-password and password-reset flow uses WordPress's native authentication functions, wrapped in BoxCart-styled forms so customers never see the WordPress admin login screen.
The flow works in three steps:
-
Request a reset link
The customer clicks "Forgot your password?" on the sign-in page and enters their email address. BoxCart calls WordPress core's
retrieve_password()function, which generates a one-time password-reset key, stores it on the user record, and emails the customer a branded reset link. The form always shows the same success message, even when no matching account exists, so the page can't be used to enumerate registered emails.Each new link replaces the one before, so since 1.8.0 the password emails (Reset your password, and Set your password for a new account) say so, and the "sent" message reminds the customer: "Only the newest link works. If you've asked more than once, use the latest email." Asking again within a minute doesn't send another email, so the link that's on its way keeps working. One visitor can ask for up to ten an hour; past either limit the page looks exactly the same.
-
Open the reset link
The reset email contains a magic URL pointing back to your Account page with
?action=reset-password&key=…&login=…. When the customer follows it, BoxCart calls core'scheck_password_reset_key()to validate the key + user combination. If the link has been used, has been replaced by a newer one, or has expired, the page says "This link has stopped working." and explains why, with an Email me a new link button (since 1.8.0) that sends a fresh one in one click.
-
Set a new password
The validated reset page shows two password fields (new password + confirm). On submit, BoxCart calls core's
reset_password()function, which sets the new password, clears the reset key, and fires thepassword_resetaction so security plugins can intercept. The customer is then redirected to the sign-in page with a success notice. WordPress's "Password Changed" email to the site admin isn't sent for customers (see Account Settings).
The reset form fires core's validate_password_reset check, so a security plugin's password rules (for example "use a strong password") apply to BoxCart's form too.
After a wrong password
Customers who made an account with their order sometimes try to sign in before they've set a password. Since 1.8.0, under the usual "wrong password" message on the account page and in the checkout's sign-in, BoxCart adds: "Just made an account with your order? Set your password with the link we emailed you first. Can't find the email? Get a new link." Get a new link opens the Forgot your password form. The line shows for any email address, so it doesn't give away who has an account.
Security plugins
Since 1.7.0, BoxCart's sign-in, registration, lost-password and reset forms all post to your shop's own pages and use WordPress core's own functions (wp_signon(), register_new_user(), retrieve_password(), reset_password()). Security plugins hook those functions, so their protection works on BoxCart's forms, and customers stay on your shop's pages even when the WordPress login page is hidden, renamed or challenged by your host.
- Lockouts (Limit Login Attempts Reloaded, Admin and Site Enhancements, and others) show "Too many sign-in attempts. Please wait a while and try again." Wordfence, Solid Security, All-In-One Security and Advanced Google reCAPTCHA show their own lock page instead, by their design. Shops without a security plugin get a basic limit from BoxCart: 10 wrong passwords from one address in 15 minutes, and 10 registrations an hour.
- CAPTCHAs: BoxCart runs WordPress's own form hooks (
login_form,register_form,lostpassword_form,resetpass_form) inside its forms, so CAPTCHA plugins show their check there. Tested with Simple Cloudflare Turnstile, Advanced Google reCAPTCHA, Wordfence Login Security's reCAPTCHA and All-In-One Security's maths CAPTCHA (registration and lost password). A failed check says "Please complete the security check and try again." Developers can turn this off with theboxcart_security_form_fieldsfilter, or skip one plugin's callback withboxcart_security_form_skip. - Two-step sign-in: for Wordfence Login Security and All-In-One Security, BoxCart shows a "Two-step sign-in code" box on its own form. Two Factor, WP 2FA and Solid Security show their own code screen, then bring the customer back to your shop. Customers without two-step sign-in see no change.
- Hidden login pages (WPS Hide Login, Solid's hide backend, All-In-One Security's renamed login, Admin and Site Enhancements' custom login URL) don't affect customers. One thing to check: Admin and Site Enhancements' "Change login URL" hides any page whose address contains "login" or "admin" from signed-out visitors. If your account or checkout page has such an address, BoxCart warns you under BoxCart → Settings → Accounts; change the page's slug.
All-In-One Security checks its sign-in CAPTCHA on wp-login.php only (its lockouts still apply to BoxCart's form). Two Factor's code screen posts to wp-login.php, so on a host that challenges wp-login.php, customers using Two Factor meet that challenge. Limit Login Attempts Reloaded's cloud MFA (premium) doesn't run on BoxCart's form; its lockouts do.
Account Settings
Configure customer account behaviour under BoxCart → Settings → Accounts. The following settings are available:
| Setting | Key | Default | Description |
|---|---|---|---|
| Require phone number at checkout | require_phone |
Off | Make the phone number field required during checkout. |
| Redirect customers away from wp-admin | redirect_customers_from_admin |
On | Automatically redirect customers to their frontend account page if they try to access the WordPress admin area. Customers are users who can't edit posts and whose roles are all customer roles: BoxCart Customer, Subscriber, or WooCommerce's Customer. Shop Staff, anyone with shop access, and staff with other roles keep the dashboard. |
| Hide admin bar for customers | hide_admin_bar_for_customers |
On | Hide the WordPress admin bar when customers are viewing the site. Applies to the same customer roles as the redirect. |
| Email me when a customer changes their password | notify_admin_customer_password |
Off | WordPress emails the site admin ("[Site] Password Changed") whenever a user resets their password. Since 1.6.0 BoxCart stops that email for customers (the same customer roles as above), so your inbox doesn't fill up with them. Tick this to get them again. Staff, administrators and other roles are unaffected, and customers still get their own emails. |
Developers can change which roles count as customers with the boxcart_customer_roles filter (see Hooks & Filters).
Shop staff
From 1.6.0, your team can run the shop without being WordPress administrators. Give someone the Shop Staff role (Users → Add New, or edit an existing user), and they can:
- use the BoxCart dashboard and the BoxCart Today dashboard widget;
- manage Orders: change statuses, confirm payments, print pick lists, export orders, and on Pro refund card payments and message customers;
- manage Products (including adding product images) and Categories;
- manage the Pickup Location, opening hours and time slots, and on Pro closures, capacity changes and extra locations;
- since 1.8.0, see Searches and the BoxCart Searches widget, and add or remove searches there, once an administrator has turned Search Insights on.
These stay with administrators: Settings (including settings import and export, and the email preview and test tools), Guided Setup, your licence and account pages, the Stripe connection test, and on Pro Reports and product CSV Import/Export. Deleting cancelled orders (one or several at once), "Delete all products" and (Pro) the Searches spreadsheet download are administrator-only too. Staff don't see the Settings or Setup links. Until the opt-in (or, on Pro, the licence) screen shown after first activation has been answered, all BoxCart screens are administrator-only.
To give another role the same shop access (for example Editor, or WooCommerce's Shop Manager), tick it under BoxCart → Settings → Accounts → Shop Staff. Administrators always have shop access. Customer roles can't be ticked.
| Setting | Key | Default | Description |
|---|---|---|---|
| Shop access for other roles | shop_staff_roles |
None | Roles given the same shop access as Shop Staff, on top of what they can already do. Saving, importing or resetting the Accounts tab updates the roles to match. Added in 1.6.0. |
Shop staff are never treated as customers: they keep the admin bar and the dashboard (also with WooCommerce still active), and signing in takes them to the BoxCart dashboard. For developers, shop access is the manage_boxcart_shop capability: administrators (anyone who can manage_options) always have it, and the boxcart_shop_staff role carries it with read and upload_files. When BoxCart is deleted with "delete all data" on, the role is removed (its accounts become Subscribers) and the capability is taken off every role and account.
Favourites
Logged-in customers can save products to their favourites by clicking the heart icon on any product card. Favourites are stored in user meta as a serialised array of product IDs. On a single-site install the meta key is boxcart_favourites; on a WordPress multisite network it is automatically scoped per subsite as boxcart_favourites_{blog_id} so that favourites on one store don't leak into another.
Key features of the favourites system:
- Toggle on/off: Clicking the heart icon adds or removes a product from favourites via the
boxcart_toggle_favouriteAJAX endpoint. Lookups are restricted to publishedboxcart_productposts and deduplicated on read. - Filter by favourites: Customers can filter the products page to show only their favourited products. The filter runs server-side via the
favourites_onlyquery parameter onboxcart_search_products/boxcart_load_table_products, so "Load more" paginates correctly within the filtered set. - Mutually exclusive with category & search: Activating a category pill, typing in the search box, or picking a category from the dropdown deactivates the favourites filter automatically. This avoids the empty-grid behaviour of intersecting filters.
- Retrieve favourites: The
boxcart_get_favouritesAJAX endpoint returns the customer's full list of favourite product data (IDs, names, images, stock status).
Favourites are only available to logged-in customers.
Encourage customers to create accounts by highlighting the favourites feature. Combined with quick reorder, it creates a fast, personalised shopping experience for repeat customers.