dashboard.php
2 years ago
downloads.php
2 years ago
form-add-payment-method.php
2 years ago
form-edit-account.php
5 months ago
form-edit-address.php
1 year ago
form-login.php
1 year ago
form-lost-password.php
1 year ago
form-reset-password.php
1 year ago
lost-password-confirmation.php
2 years ago
my-account.php
2 years ago
my-address.php
1 year ago
my-downloads.php
2 years ago
my-orders.php
5 years ago
navigation.php
1 year ago
orders.php
1 year ago
payment-methods.php
2 years ago
view-order.php
3 months ago
form-edit-account.php
100 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Edit account form |
| 4 | * |
| 5 | * This template can be overridden by copying it to yourtheme/woocommerce/myaccount/form-edit-account.php. |
| 6 | * |
| 7 | * HOWEVER, on occasion WooCommerce will need to update template files and you |
| 8 | * (the theme developer) will need to copy the new files to your theme to |
| 9 | * maintain compatibility. We try to do this as little as possible, but it does |
| 10 | * happen. When this occurs the version of the template file will be bumped and |
| 11 | * the readme will list any important changes. |
| 12 | * |
| 13 | * @see https://woocommerce.com/document/template-structure/ |
| 14 | * @package WooCommerce\Templates |
| 15 | * @version 10.5.0 |
| 16 | */ |
| 17 | |
| 18 | defined( 'ABSPATH' ) || exit; |
| 19 | |
| 20 | /** |
| 21 | * Hook - woocommerce_before_edit_account_form. |
| 22 | * |
| 23 | * @since 2.6.0 |
| 24 | */ |
| 25 | do_action( 'woocommerce_before_edit_account_form' ); |
| 26 | ?> |
| 27 | |
| 28 | |
| 29 | <form class="woocommerce-EditAccountForm edit-account" action="" method="post" <?php do_action( 'woocommerce_edit_account_form_tag' ); ?> > |
| 30 | |
| 31 | <?php do_action( 'woocommerce_edit_account_form_start' ); ?> |
| 32 | |
| 33 | <p class="woocommerce-form-row woocommerce-form-row--first form-row form-row-first"> |
| 34 | <label for="account_first_name"><?php esc_html_e( 'First name', 'woocommerce' ); ?> <span class="required" aria-hidden="true">*</span></label> |
| 35 | <input type="text" class="woocommerce-Input woocommerce-Input--text input-text" name="account_first_name" id="account_first_name" autocomplete="given-name" value="<?php echo esc_attr( $user->first_name ); ?>" aria-required="true" /> |
| 36 | </p> |
| 37 | <p class="woocommerce-form-row woocommerce-form-row--last form-row form-row-last"> |
| 38 | <label for="account_last_name"><?php esc_html_e( 'Last name', 'woocommerce' ); ?> <span class="required" aria-hidden="true">*</span></label> |
| 39 | <input type="text" class="woocommerce-Input woocommerce-Input--text input-text" name="account_last_name" id="account_last_name" autocomplete="family-name" value="<?php echo esc_attr( $user->last_name ); ?>" aria-required="true" /> |
| 40 | </p> |
| 41 | <div class="clear"></div> |
| 42 | |
| 43 | <p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide"> |
| 44 | <label for="account_display_name"><?php esc_html_e( 'Display name', 'woocommerce' ); ?> <span class="required" aria-hidden="true">*</span></label> |
| 45 | <input type="text" class="woocommerce-Input woocommerce-Input--text input-text" name="account_display_name" id="account_display_name" aria-describedby="account_display_name_description" value="<?php echo esc_attr( $user->display_name ); ?>" aria-required="true" /> <span id="account_display_name_description"><em><?php esc_html_e( 'This will be how your name will be displayed in the account section and in reviews', 'woocommerce' ); ?></em></span> |
| 46 | </p> |
| 47 | <div class="clear"></div> |
| 48 | |
| 49 | <p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide"> |
| 50 | <label for="account_email"><?php esc_html_e( 'Email address', 'woocommerce' ); ?> <span class="required" aria-hidden="true">*</span></label> |
| 51 | <input type="email" class="woocommerce-Input woocommerce-Input--email input-text" name="account_email" id="account_email" autocomplete="email" value="<?php echo esc_attr( $user->user_email ); ?>" aria-required="true" /> |
| 52 | </p> |
| 53 | |
| 54 | <?php |
| 55 | /** |
| 56 | * Hook where additional fields should be rendered. |
| 57 | * |
| 58 | * @since 8.7.0 |
| 59 | */ |
| 60 | do_action( 'woocommerce_edit_account_form_fields' ); |
| 61 | ?> |
| 62 | |
| 63 | <fieldset> |
| 64 | <legend><?php esc_html_e( 'Password change', 'woocommerce' ); ?></legend> |
| 65 | |
| 66 | <p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide"> |
| 67 | <label for="password_current"><?php esc_html_e( 'Current password (leave blank to leave unchanged)', 'woocommerce' ); ?></label> |
| 68 | <input type="password" class="woocommerce-Input woocommerce-Input--password input-text" name="password_current" id="password_current" autocomplete="current-password" /> |
| 69 | </p> |
| 70 | <p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide"> |
| 71 | <label for="password_1"><?php esc_html_e( 'New password (leave blank to leave unchanged)', 'woocommerce' ); ?></label> |
| 72 | <input type="password" class="woocommerce-Input woocommerce-Input--password input-text" name="password_1" id="password_1" autocomplete="new-password" /> |
| 73 | </p> |
| 74 | <p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide"> |
| 75 | <label for="password_2"><?php esc_html_e( 'Confirm new password', 'woocommerce' ); ?></label> |
| 76 | <input type="password" class="woocommerce-Input woocommerce-Input--password input-text" name="password_2" id="password_2" autocomplete="new-password" /> |
| 77 | </p> |
| 78 | </fieldset> |
| 79 | <div class="clear"></div> |
| 80 | |
| 81 | <?php |
| 82 | /** |
| 83 | * My Account edit account form. |
| 84 | * |
| 85 | * @since 2.6.0 |
| 86 | */ |
| 87 | do_action( 'woocommerce_edit_account_form' ); |
| 88 | ?> |
| 89 | |
| 90 | <p> |
| 91 | <?php wp_nonce_field( 'save_account_details', 'save-account-details-nonce' ); ?> |
| 92 | <button type="submit" class="woocommerce-Button button<?php echo esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ); ?>" name="save_account_details" value="<?php esc_attr_e( 'Save changes', 'woocommerce' ); ?>"><?php esc_html_e( 'Save changes', 'woocommerce' ); ?></button> |
| 93 | <input type="hidden" name="action" value="save_account_details" /> |
| 94 | </p> |
| 95 | |
| 96 | <?php do_action( 'woocommerce_edit_account_form_end' ); ?> |
| 97 | </form> |
| 98 | |
| 99 | <?php do_action( 'woocommerce_after_edit_account_form' ); ?> |
| 100 |