Configure registration and login
MyListing renders registration and login through WooCommerce’s assigned My account page. Its Accounts & Roles screen controls the My account registration setting, username and password generation, role choice, profile fields, and optional reCAPTCHA.
Enable My account registration
Section titled “Enable My account registration”- Go to Theme Tools → User Roles. The page heading is Accounts & Roles.
- Enable Enable user registration.
- Choose Generate username automatically and Generate password automatically as required.
- Set Default account type. This preselects a role on the registration form; it does not remove the other role when the alternate account type is enabled.
- Configure the registration fields under User Roles & Permissions.
- Select Save settings.
- Sign out or open a private browser window, visit the assigned My account page, and complete a test registration.
These three general switches write directly to WooCommerce’s corresponding options. Enable user registration is the same setting shown under WooCommerce → Settings → Accounts & Privacy → Allow customers to create an account → On “My account” page. Changing it in either screen changes the same stored value.
When automatic generation is enabled, MyListing omits the corresponding Username or Password field from registration even if that field is present in the role’s form configuration. WooCommerce generates the value and handles the new-account email.
Configure registration and profile fields
Section titled “Configure registration and profile fields”Each enabled account type has an ordered Registration form fields list. Available presets include Username, Email, Password, First Name, Last Name, Display Name, About Yourself, Profile Picture, and Social Networks. For each field, configure its label, description, required state, and whether it appears during registration or under My Account → Account details.
Username, Email, and Password are core fields and cannot be removed from the role configuration. Their visible behavior still follows the automatic username and password settings. About Yourself defaults to a 140-character maximum. Profile Picture accepts JPG, JPEG, GIF, and PNG in the role-field implementation; server upload limits still apply.
MyListing replaces WooCommerce’s default required-field list on Account details with the fields configured for the user’s MyListing account type. Username cannot be changed there, and Password is not required unless the user is changing it. If First Name, Last Name, or Display Name is hidden, the theme preserves its existing value instead of blanking it during a profile update.
Protect login and registration with reCAPTCHA
Section titled “Protect login and registration with reCAPTCHA”The Enable Google reCAPTCHA in login form and Enable Google reCAPTCHA in register form switches appear on Theme Tools → User Roles. Before enabling either one:
- Go to Listings → Settings and scroll to the reCAPTCHA section.
- Select reCAPTCHA v2 or reCAPTCHA v3 under Recaptcha type.
- Enter reCAPTCHA Site Key and reCAPTCHA Secret Key for the site’s domains.
- Save, return to Theme Tools → User Roles, enable the required form switches, and test while logged out.
The account registration reCAPTCHA applies to the My account registration form, not to WooCommerce checkout account creation. Google operates the external reCAPTCHA service; its terms, privacy handling, quotas, and availability apply.
Treat checkout registration separately
Section titled “Treat checkout registration separately”Under WooCommerce → Settings → Accounts & Privacy, WooCommerce currently exposes:
- Enable guest checkout (recommended)
- Enable log-in during checkout
- Allow customers to create an account → During checkout
- Allow customers to create an account → On “My account” page
MyListing’s role selector, role-specific fields, registration reCAPTCHA, and registration terms checkbox are intentionally skipped during checkout. An account created there uses WooCommerce’s checkout flow and normal customer-role fallback. If choosing an account type or completing custom profile fields is mandatory, direct users to My account registration before purchase and test that requirement with every checkout implementation.
The MyListing checkout override can prevent a logged-out purchase when WooCommerce requires an account. A block-based Checkout follows WooCommerce Blocks instead of MyListing’s classic checkout template, so test the exact Cart and Checkout page content in use.
Terms, social login, and redirects
Section titled “Terms, social login, and redirects”When a Terms and conditions page is assigned and WooCommerce enables its checkbox, MyListing also displays and validates that checkbox on My account registration. Developers can suppress only this MyListing registration checkbox with:
add_filter( 'mylisting/enable-terms-checkbox-in-registration', '__return_false' );Social login is configured separately. When an enabled social provider creates a user, MyListing uses the submitted role if valid; otherwise it falls back to Default account type when the alternate type is enabled, or Customer when it is not. Review Configure social login and test both new-account and existing-email paths.
By default, the login and registration forms add a validated redirect back to the referring page. A child theme or custom plugin can change the fallback URLs:
add_filter( 'mylisting/login_redirect_url', function( $url ) { return home_url( '/my-account/' );} );
add_filter( 'mylisting/register_redirect_url', function( $url ) { return home_url( '/welcome/' );} );The explicit redirect request value takes precedence after WordPress validates it, so test login links that include a redirect parameter.
Troubleshoot login or registration
Section titled “Troubleshoot login or registration”- Confirm WooCommerce is active and a published page containing
[woocommerce_my_account]is assigned under WooCommerce → Settings → Advanced → Page setup → My account page. - Test while logged out. A signed-in user sees the dashboard, not the login and registration forms.
- Confirm Enable user registration is still enabled. Another plugin changing WooCommerce account settings can turn it off.
- If registration opens on login by default, inspect custom code using
mylisting/user_roles/default_form; the theme’s default value islogin. - If reCAPTCHA fails, verify its version, keys, domain registration, consent/cookie tooling, and network requests before disabling other account validation.
- If a My account subpage returns 404, save Settings → Permalinks once and purge caches.
- If password reset or account emails do not arrive, inspect WooCommerce email settings and transactional email delivery; MyListing does not replace WooCommerce’s password-reset system.
Next: Configure social login →
