Woocommerce 3.0.0 Support
This commit is contained in:
parent
27fd9d67f9
commit
8b31b6f7fb
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* Edit address form
|
||||
*
|
||||
* Updated for Understrap to maintain Woocommerce 3.0.3 compatability.
|
||||
* 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
|
||||
|
@ -13,14 +13,14 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 2.6.0
|
||||
* @version 3.0.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$page_title = ( $load_address === 'billing' ) ? __( 'Billing Address', 'understrap' ) : __( 'Shipping Address', 'understrap' );
|
||||
$page_title = ( 'billing' === $load_address ) ? __( 'Billing address', 'understrap' ) : __( 'Shipping address', 'understrap' );
|
||||
|
||||
do_action( 'woocommerce_before_edit_account_address_form' ); ?>
|
||||
|
||||
|
@ -30,23 +30,25 @@ do_action( 'woocommerce_before_edit_account_address_form' ); ?>
|
|||
|
||||
<form method="post">
|
||||
|
||||
<h3><?php echo apply_filters( 'woocommerce_my_account_edit_address_title', $page_title ); ?></h3>
|
||||
<h3><?php echo apply_filters( 'woocommerce_my_account_edit_address_title', $page_title, $load_address ); ?></h3>
|
||||
|
||||
<?php do_action( "woocommerce_before_edit_address_form_{$load_address}" ); ?>
|
||||
<div class="woocommerce-address-fields">
|
||||
<?php do_action( "woocommerce_before_edit_address_form_{$load_address}" ); ?>
|
||||
|
||||
<?php foreach ( $address as $key => $field ) : ?>
|
||||
<div class="woocommerce-address-fields__field-wrapper">
|
||||
<?php foreach ( $address as $key => $field ) : ?>
|
||||
<?php woocommerce_form_field( $key, $field, ! empty( $_POST[ $key ] ) ? wc_clean( $_POST[ $key ] ) : $field['value'] ); ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<?php woocommerce_form_field( $key, $field, ! empty( $_POST[ $key ] ) ? wc_clean( $_POST[ $key ] ) : $field['value'] ); ?>
|
||||
<?php do_action( "woocommerce_after_edit_address_form_{$load_address}" ); ?>
|
||||
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php do_action( "woocommerce_after_edit_address_form_{$load_address}" ); ?>
|
||||
|
||||
<p>
|
||||
<input type="submit" class="btn btn-outline-primary" name="save_address" value="<?php esc_attr_e( 'Save Address', 'understrap' ); ?>" />
|
||||
<?php wp_nonce_field( 'woocommerce-edit_address' ); ?>
|
||||
<input type="hidden" name="action" value="edit_address" />
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" class="btn btn-outline-primary" name="save_address" value="<?php esc_attr_e( 'Save address', 'understrap' ); ?>" />
|
||||
<?php wp_nonce_field( 'woocommerce-edit_address' ); ?>
|
||||
<input type="hidden" name="action" value="edit_address" />
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
|
Reference in New Issue