• Resolved mongolsightseeing

    (@mongolsightseeing)


    In my account page in the login form.
    1. Error: The password field is empty. Also
    2. Unknown username. Check again or try your email address. Etc.
    Which file included These message code?I need to translate inside code. There was not in loco translate plugin.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello @mongolsightseeing ,

    I understand the confusion.

    These error messages are not actually coming from WooCommerce. They are default error messages from WordPress.

    If you navigate to Loco Translate > WordPress and edit the translation files, you will be able to translate these messages.

    In case you need to check how to translate WordPress you can read more here – https://translate.www.ads-software.com/

    I hope this information helps.

    Thank you ??

    Thread Starter mongolsightseeing

    (@mongolsightseeing)

    I ask again. is the Php code Of User registration form in signup? I want to change tooltip and pop-up message in fields. For example Enter an email address or field is empty etc …

    Hello @mongolsightseeing ,

    WooCommerce adds some of the error messages that you see on the registration page. You will be able to find the registration error messages and their conditions here in this file –

    Path: https://github.com/woocommerce/woocommerce/blob/2471f816e4a438adb856a7bd3e332ba12c7ab00b/includes/wc-user-functions.php#L41

    I have an example code to use the filter woocommerce_process_registration_errors and override the default error messages –

    function woocommerce_registration_errors( $validation_error, $username, $password, $email ) {
        if( empty( $email ) || ! is_email( $email ) ){
            $validation_error->add('error', 'Please provide a valid email address custom error.');
        }
        return $validation_error;
    }
    
    add_filter( 'woocommerce_process_registration_errors', 'woocommerce_registration_errors', 10, 4 );

    If the error message does not match properly in your site and from the WooCommerce file then any of your plugin/themes is overriding them. Plugins can add/override fields and error messages of WooCommerce’s registration form. So it is always better to check with the plugin developers to get their suggestions.

    I hope this information helps.

    Thank you ??

    Hi there,

    We’ve not heard back from you in a while, so I’m marking this thread as resolved.

    Hopefully, you were able to find a solution to your problem! If you have further questions, please feel free to open a new topic.

    Thank you ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Woocommerce’ is closed to new replies.