My Account page - by sisalik - on WordPress WooCommerce support

This topic has 5 replies, 2 voices, and was last updated 4 years, 5 months ago ago by Olga Barlow

  • Avatar: sisalik
    sisalik
    Participant
    July 10, 2021 at 23:03

    Hi!

    1) I want to remove display name (user name) field on My Account page and use email address instead of username (username = email address).

    Doesn’t work:
    add_filter(‘woocommerce_save_account_details_required_fields’, ‘hide_fields’);
    function hide_fields($required_fields)
    {
    unset($required_fields[“account_display_name”]);
    return $required_fields;
    }

    2) Also “Addresses” label is missing for some reason in the menu on the left

    Please, contact administrator
    for this information.
    4 Answers
    Avatar: sisalik
    sisalik
    Participant
    July 10, 2021 at 23:11

    Menu

    Please contact administrator
    for this information.
    Avatar: Olga Barlow
    Olga Barlow
    Participant
    July 12, 2021 at 12:38

    Hello,

    1) Where did you get that code?
    I suppose that you missed to add custom CSS to the hide field, with the PHP code you just makes that field optional

    .woocommerce-EditAccountForm.edit-account .woocommerce-form-row.form-row-wide #account_display_name, .woocommerce-EditAccountForm.edit-account .woocommerce-form-row.form-row-wide #account_display_name + span, .woocommerce-EditAccountForm.edit-account .woocommerce-form-row.form-row-wide label[for="account_display_name"] {
        display: none;
    }

    2) Translation was missing https://prnt.sc/1aiddeu

    Regards

    Avatar: sisalik
    sisalik
    Participant
    July 12, 2021 at 15:20

    1) Hiding is not enough, it shouldn’t be possible to save even when edited. The saving function must function differently. How to fix that? Username must stay same as email.

    Avatar: Olga Barlow
    Olga Barlow
    Participant
    July 12, 2021 at 21:05

    Hello,

    WooCommerce does not have such option. Submit additional customization request here if you need help with this. Our default support does not include customization services https://themeforest.net/page/item_support_policy.

    Regards

  • Viewing 5 results - 1 through 5 (of 5 total)

The issue related to '‘My Account page’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.