WooCommerce Display name cannot be changed to email address due to privacy concern

Viewed 511

Have a site using email addresses as the usernames/display names. This is all working except when trying to update account details. WooCommerce gives error:

Display name cannot be changed to email address due to privacy concern

Is there a way to override this? I see the offending code in the WC plugin file class-wc-form-handler.php:

if ( is_email( $account_display_name ) ) {
    wc_add_notice( __( 'Display name cannot be changed to email address due to privacy concern.', 'woocommerce' ), 'error' );
}

I don't want to edit the plugin file directly to help future updates, but how do I allow this?

0 Answers
Related