dashboard.php
5 years ago
downloads.php
5 years ago
form-add-payment-method.php
3 years ago
form-edit-account.php
3 years ago
form-edit-address.php
3 years ago
form-login.php
3 years ago
form-lost-password.php
3 years ago
form-reset-password.php
3 years ago
lost-password-confirmation.php
5 years ago
my-account.php
5 years ago
my-address.php
5 years ago
my-downloads.php
5 years ago
my-orders.php
5 years ago
navigation.php
5 years ago
orders.php
3 years ago
payment-methods.php
5 years ago
view-order.php
5 years ago
form-edit-address.php
57 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Edit address form |
| 4 | * |
| 5 | * This template can be overridden by copying it to yourtheme/woocommerce/myaccount/form-edit-address.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://docs.woocommerce.com/document/template-structure/ |
| 14 | * @package WooCommerce\Templates |
| 15 | * @version 7.0.1 |
| 16 | */ |
| 17 | |
| 18 | defined( 'ABSPATH' ) || exit; |
| 19 | |
| 20 | $page_title = ( 'billing' === $load_address ) ? esc_html__( 'Billing address', 'woocommerce' ) : esc_html__( 'Shipping address', 'woocommerce' ); |
| 21 | |
| 22 | do_action( 'woocommerce_before_edit_account_address_form' ); ?> |
| 23 | |
| 24 | <?php if ( ! $load_address ) : ?> |
| 25 | <?php wc_get_template( 'myaccount/my-address.php' ); ?> |
| 26 | <?php else : ?> |
| 27 | |
| 28 | <form method="post"> |
| 29 | |
| 30 | <h3><?php echo apply_filters( 'woocommerce_my_account_edit_address_title', $page_title, $load_address ); ?></h3><?php // @codingStandardsIgnoreLine ?> |
| 31 | |
| 32 | <div class="woocommerce-address-fields"> |
| 33 | <?php do_action( "woocommerce_before_edit_address_form_{$load_address}" ); ?> |
| 34 | |
| 35 | <div class="woocommerce-address-fields__field-wrapper"> |
| 36 | <?php |
| 37 | foreach ( $address as $key => $field ) { |
| 38 | woocommerce_form_field( $key, $field, wc_get_post_data_by_key( $key, $field['value'] ) ); |
| 39 | } |
| 40 | ?> |
| 41 | </div> |
| 42 | |
| 43 | <?php do_action( "woocommerce_after_edit_address_form_{$load_address}" ); ?> |
| 44 | |
| 45 | <p> |
| 46 | <button type="submit" class="button<?php echo esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ); ?>" name="save_address" value="<?php esc_attr_e( 'Save address', 'woocommerce' ); ?>"><?php esc_html_e( 'Save address', 'woocommerce' ); ?></button> |
| 47 | <?php wp_nonce_field( 'woocommerce-edit_address', 'woocommerce-edit-address-nonce' ); ?> |
| 48 | <input type="hidden" name="action" value="edit_address" /> |
| 49 | </p> |
| 50 | </div> |
| 51 | |
| 52 | </form> |
| 53 | |
| 54 | <?php endif; ?> |
| 55 | |
| 56 | <?php do_action( 'woocommerce_after_edit_account_address_form' ); ?> |
| 57 |