registered – remove (error:) from registration errors woocommerce

Question

error: Please provide a valid email address.

remove error: from registration errors woocommerce

function wwoocommerce_process_registration_errors( $validation_error, $unsername, $password, $email ) {
    if ( empty( $email ) || ! WC_Validation::is_email( $email ) ) {
        $validation_error->add( 'registration-error-invalid-email', __( 'Please provide a valid email address.', 'woocommerce' ) );
    }
    return $validation_error;

} add_filter('woocommerce_process_registration_errors', 'wwoocommerce_process_registration_errors', 10, 4 );

https://woocommerce.github.io/code-reference/files/woocommerce-includes-class-wc-form-handler.html#source-view.1121

catch ( Exception $e ) {
                if ( $e->getMessage() ) {
                    wc_add_notice( '<strong>' . __( 'Error:', 'woocommerce' ) . '</strong> ' . $e->getMessage(), 'error' );
                }
            }

0
amirrouzegari 3 weeks 2021-12-26T11:40:11-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse