Error if user has no display name
-
Hi,
For logged in users, your template, request-quote-form.php, fills in hidden fields with the user’s display name and email and skips creating visible name or email fields.
Problem: there’s no check for whether $current_user->display_name and $current_user->user_email are empty or not.
As an example, if a logged in user has only a username, but not a display name, form submission fails with an error “Please enter a name”. But, of course, there’s no place to enter a name, so they’re at a dead end.
Maybe you should create the Name and Email fields for everyone, and just pre-fill them with what you get from the user’s profile. That would give the user a chance to fill them in if they are empty or modify them if they want to use different values.
Regards
https://www.ads-software.com/plugins/yith-woocommerce-request-a-quote/
- The topic ‘Error if user has no display name’ is closed to new replies.