Merge pull request #5999 from tamarazuk/master

Add before/after edit address form actions
This commit is contained in:
Mike Jolley 2014-08-12 12:37:29 +01:00
commit 644adffbec
1 changed files with 8 additions and 4 deletions

View File

@ -2,13 +2,13 @@
/**
* Edit address form
*
* @author WooThemes
* @package WooCommerce/Templates
* @author WooThemes
* @package WooCommerce/Templates
* @version 2.1.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
exit;
}
global $current_user;
@ -30,11 +30,15 @@ get_currentuserinfo();
<h3><?php echo apply_filters( 'woocommerce_my_account_edit_address_title', $page_title ); ?></h3>
<?php do_action( "woocommerce_before_edit_address_form_{$load_address}" ); ?>
<?php foreach ( $address as $key => $field ) : ?>
<?php woocommerce_form_field( $key, $field, ! empty( $_POST[ $key ] ) ? wc_clean( $_POST[ $key ] ) : $field['value'] ); ?>
<?php endforeach; ?>
<?php do_action( "woocommerce_after_edit_address_form_{$load_address}" ); ?>
<p>
<input type="submit" class="button" name="save_address" value="<?php _e( 'Save Address', 'woocommerce' ); ?>" />
@ -44,4 +48,4 @@ get_currentuserinfo();
</form>
<?php endif; ?>
<?php endif; ?>