I have customized the myaccount/form-edit-account.php WooCommerce template file. So that a customer in addition to the default fields first name, last name, display name, email and password. Now also has the option to add/edit his nickname.
Once logged in, he can access and edit that information on his account page.
Here the code I have added in the myaccount/form-edit-account.php on line 35 (between the last name and the display name field.
<p class="woocommerce-form-row woocommerce-form-row--last form-row form-row-wide">
<label for="account_nickname"><?php esc_html_e( 'Téléphone (non modifiable. Si erreur contacer Laura au 07.66.89.85.05) ', 'woocommerce' ); ?>
<input type="text" class="woocommerce-Input woocommerce-Input--text input-text" name="account_nickname" id="account_nickname" autocomplete="family-name" value="<?php echo esc_attr( $user->nickname ); ?>" />
</p>
<div class="clear"></div>
Unfortunatly, when he wants to modify the nickname, and clicks on the submit button, no error occurs, but the nickname is not updated.
Someone who can tell me what further adjustments are needed? am I doing something wrong somewhere?