| Server IP : 104.171.130.249 / Your IP : 216.73.216.146 Web Server : nginx/1.25.5 System : Linux 0dac65491b7e 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64 User : root ( 0) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/html/wp-content/themes/matreshka/woocommerce/myaccount/ |
Upload File : |
<?php /** * Edit account form – custom Matreshka design * * Mirrors the registration profile fields. * * @see https://woocommerce.com/document/template-structure/ * @package WooCommerce\Templates * @version 9.7.0 */ defined( 'ABSPATH' ) || exit; $user_id = get_current_user_id(); $birthday = get_user_meta( $user_id, '_matreshka_birthday', true ); $phone = get_user_meta( $user_id, 'billing_phone', true ); $address_url = wc_get_endpoint_url( 'edit-address', 'billing', wc_get_page_permalink( 'myaccount' ) ); do_action( 'woocommerce_before_edit_account_form' ); ?> <div class="matreshka-edit-account"> <form class="edit-account-form" action="" method="post" <?php do_action( 'woocommerce_edit_account_form_tag' ); ?>> <?php do_action( 'woocommerce_edit_account_form_start' ); ?> <h2 class="montserrat-bold edit-account__title">Мой профиль</h2> <p class="edit-account__subtitle montserrat-medium">Ваши личные данные</p> <div class="edit-account__fields"> <!-- Name --> <div class="edit-account__group"> <label class="edit-account__label montserrat-medium" for="account_first_name">Имя *</label> <input type="text" id="account_first_name" name="account_first_name" class="edit-account__input montserrat-medium" placeholder="Ваше имя" autocomplete="given-name" value="<?php echo esc_attr( $user->first_name ); ?>" required> </div> <!-- Phone (read-only) --> <?php if ( $phone ) : ?> <div class="edit-account__group"> <label class="edit-account__label montserrat-medium">Телефон</label> <input type="tel" class="edit-account__input edit-account__input--disabled montserrat-medium" value="<?php echo esc_attr( $phone ); ?>" readonly disabled> </div> <?php endif; ?> <!-- Email --> <div class="edit-account__group"> <label class="edit-account__label montserrat-medium" for="account_email">Email *</label> <input type="email" id="account_email" name="account_email" class="edit-account__input montserrat-medium" placeholder="email@example.com" autocomplete="email" value="<?php echo esc_attr( $user->user_email ); ?>" required> </div> <!-- Birthday --> <div class="edit-account__group"> <label class="edit-account__label montserrat-medium" for="matreshka_birthday">Дата рождения</label> <div class="edit-account__date-wrap"> <input type="date" id="matreshka_birthday" name="matreshka_birthday" class="edit-account__input montserrat-medium" value="<?php echo esc_attr( $birthday ); ?>"> <span class="edit-account__date-icon"> <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1.66699 10C1.66699 6.85734 1.66699 5.286 2.6433 4.30968C3.61961 3.33337 5.19096 3.33337 8.33366 3.33337H11.667C14.8097 3.33337 16.381 3.33337 17.3573 4.30968C18.3337 5.286 18.3337 6.85734 18.3337 10V11.6667C18.3337 14.8094 18.3337 16.3808 17.3573 17.3571C16.381 18.3334 14.8097 18.3334 11.667 18.3334H8.33366C5.19096 18.3334 3.61961 18.3334 2.6433 17.3571C1.66699 16.3808 1.66699 14.8094 1.66699 11.6667V10Z" stroke="#58595E" stroke-width="1.5"/><path d="M5.83301 3.33337V2.08337" stroke="#58595E" stroke-width="1.5" stroke-linecap="round"/><path d="M14.167 3.33337V2.08337" stroke="#58595E" stroke-width="1.5" stroke-linecap="round"/><path d="M2.08301 7.5H17.9163" stroke="#58595E" stroke-width="1.5" stroke-linecap="round"/></svg> </span> </div> </div> <!-- Hidden fields required by WC --> <input type="hidden" name="account_last_name" value="<?php echo esc_attr( $user->last_name ?: '-' ); ?>" /> <input type="hidden" name="account_display_name" value="<?php echo esc_attr( $user->first_name ?: $user->display_name ); ?>" /> </div> <?php do_action( 'woocommerce_edit_account_form' ); ?> <button type="submit" class="btn btn-red-primary w-100 montserrat-bold edit-account__btn" name="save_account_details" value="<?php esc_attr_e( 'Save changes', 'woocommerce' ); ?>"> Сохранить </button> <?php wp_nonce_field( 'save_account_details', 'save-account-details-nonce' ); ?> <input type="hidden" name="action" value="save_account_details" /> <?php do_action( 'woocommerce_edit_account_form_end' ); ?> </form> <!-- Delivery address link --> <div class="edit-account__address-card"> <div class="edit-account__address-info"> <img src="<?php echo esc_url( get_template_directory_uri() . '/assets/icons/Subtract.svg' ); ?>" alt="" class="edit-account__address-icon"> <div> <p class="edit-account__address-title montserrat-semibold">Адрес доставки</p> <span class="edit-account__address-value montserrat-medium"> <?php echo esc_html( matreshka_get_user_address( $user_id ) ); ?> </span> </div> </div> <a href="<?php echo esc_url( $address_url ); ?>" class="btn btn-secondary montserrat-semibold edit-account__address-btn"> Изменить <img src="<?php echo esc_url( get_template_directory_uri() . '/assets/icons/AltArrowRight.svg' ); ?>" alt="" class="ms-1"> </a> </div> </div> <?php do_action( 'woocommerce_after_edit_account_form' ); ?>