MainWP Community

Make Account Display Name Field on My Account in WooCommerce Not Required

Make the account display name not a required field on My Account in WooCommerce on child sites.

Snippet Type

Execute on Child Sites

Snippet

add_filter('woocommerce_save_account_details_required_fields', 'wc_save_account_details_required_fields' );
function wc_save_account_details_required_fields( $required_fields ){
    unset( $required_fields['account_display_name'] );
    return $required_fields;
}
4 Likes