Registration fields to woocommerce my-account account details
-
Hi, I am using this code from functions.php and it displays all the correct information from your plugin field to woocommerce my-account – account details page, but this field can not be edited.
Can you help me out how to make them editable?
// Show date of birth in /my-account/ page ------------------------------------------------------------------ function my_woocommerce_edit_account_form() { $user_id = get_current_user_id(); $user = get_userdata( $user_id ); if ( !$user ) return; $user_dob = get_user_meta( $user_id, 'user_registration_date_of_birth', true ); $user_id_number = get_user_meta( $user_id, 'user_registration_id_number', true ); $user_phone = get_user_meta( $user_id, 'user_registration_phone_number', true ); $user_fb_url = get_user_meta( $user_id, 'user_registration_facebook_url', true ); $url = $user->user_url; ?> <fieldset> <legend>More details</legend> <div class="form-group"> <div class="form-row validate-required" data-priority=""><label for="user_registration_date_of_birth"class="ur-label"> <?php _e( 'Date of Birth.' , 'woocommerce' ); ?> <span class="required">*</span> </label> <input type="text" class="form-control user_registration_date_of_birth requiredField" name="user_registration_date_of_birth" id="user_registration_date_of_birth" disabled="disabled" value="<?php echo esc_attr( $user_dob ); ?>" /> </div> </div> </fieldset> <?php } add_action( 'woocommerce_edit_account_form', 'my_woocommerce_edit_account_form' );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Registration fields to woocommerce my-account account details’ is closed to new replies.