Woocommerce 3.0.9 template update.

This commit is contained in:
Jason King 2017-06-27 15:02:35 +09:30 committed by GitHub
parent 2a68f6d847
commit d67f5406ce
1 changed files with 10 additions and 5 deletions

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* Edit address form * Edit address form
* Updated for Understrap to maintain Woocommerce 3.0.3 compatability. * Updated for Understrap to maintain Woocommerce 3.0.9 compatability.
* This template can be overridden by copying it to yourtheme/woocommerce/myaccount/form-edit-address.php. * This template can be overridden by copying it to yourtheme/woocommerce/myaccount/form-edit-address.php.
* *
* HOWEVER, on occasion WooCommerce will need to update template files and you * HOWEVER, on occasion WooCommerce will need to update template files and you
@ -13,7 +13,7 @@
* @see https://docs.woocommerce.com/document/template-structure/ * @see https://docs.woocommerce.com/document/template-structure/
* @author WooThemes * @author WooThemes
* @package WooCommerce/Templates * @package WooCommerce/Templates
* @version 3.0.0 * @version 3.0.9
*/ */
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
@ -36,9 +36,14 @@ do_action( 'woocommerce_before_edit_account_address_form' ); ?>
<?php do_action( "woocommerce_before_edit_address_form_{$load_address}" ); ?> <?php do_action( "woocommerce_before_edit_address_form_{$load_address}" ); ?>
<div class="woocommerce-address-fields__field-wrapper"> <div class="woocommerce-address-fields__field-wrapper">
<?php foreach ( $address as $key => $field ) : ?> <?php
<?php woocommerce_form_field( $key, $field, ! empty( $_POST[ $key ] ) ? wc_clean( $_POST[ $key ] ) : $field['value'] ); ?> foreach ( $address as $key => $field ) {
<?php endforeach; ?> if ( isset( $field['country_field'], $address[ $field['country_field'] ] ) ) {
$field['country'] = wc_get_post_data_by_key( $field['country_field'], $address[ $field['country_field'] ]['value'] );
}
woocommerce_form_field( $key, $field, wc_get_post_data_by_key( $key, $field['value'] ) );
}
?>
</div> </div>
<?php do_action( "woocommerce_after_edit_address_form_{$load_address}" ); ?> <?php do_action( "woocommerce_after_edit_address_form_{$load_address}" ); ?>