Improve wording

This commit is contained in:
Florian TIAR 2019-04-26 17:40:05 +02:00 committed by GitHub
parent 391570bc73
commit 8cb080ac9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 3 deletions

View File

@ -44,15 +44,20 @@ $col = 1;
<div class="u-columns woocommerce-Addresses col2-set addresses">
<?php endif; ?>
<?php foreach ( $get_addresses as $name => $title ) : ?>
<?php foreach ( $get_addresses as $name => $title ) :
$address = wc_get_account_formatted_address( $name ); ?>
<div class="u-column<?php echo ( ( $col = $col * -1 ) < 0 ) ? 1 : 2; ?> col-<?php echo ( ( $oldcol = $oldcol * -1 ) < 0 ) ? 1 : 2; ?> woocommerce-Address">
<header class="woocommerce-Address-title title">
<h3><?php echo $title; ?></h3>
<a href="<?php echo esc_url( wc_get_endpoint_url( 'edit-address', $name ) ); ?>" class="edit"><?php _e( 'Edit', 'woocommerce' ); ?></a>
<?php if ( $address ) : ?>
<a href="<?php echo esc_url( wc_get_endpoint_url( 'edit-address', $name ) ); ?>" class="edit"><?php _e( 'Edit', 'woocommerce' ); ?></a>
<?php else: ?>
<a href="<?php echo esc_url( wc_get_endpoint_url( 'edit-address', $name ) ); ?>" class="edit"><?php _e( 'Add', 'woocommerce' ); ?></a>
<?php endif; ?>
</header>
<address><?php
$address = wc_get_account_formatted_address( $name );
echo $address ? wp_kses_post( $address ) : esc_html_e( 'You have not set up this type of address yet.', 'woocommerce' );
?></address>
</div>