My account page, don’t show the complete “Registration form”

By default, it shows like this, but if you want to add more options like “Name, Phone number, Email” option in the registration form, you have to follow these two simple tips:- Step 1: Enable the Customer Registration Option Step 2: Add Custom Code in Functions.php File function wooc_extra_register_fields() { ?> <p class=”form-row form-row-wide”> <label … Read more

Prefix user login_name and validate it is unique on Registration

The usual way to create a user goes with the register_new_user function. This function offers no filter for the user name. It just checks for uniqueness with username_exists. To actually create the user register_new_user then calls wp_create_user, which in turn calls wp_insert_user. The latter function contains the pre_user_login filter. Then it calls username_exists again, because … Read more