Advertisement
Guest User

form-edit-account

a guest
Aug 30th, 2015
309
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.94 KB | None | 0 0
  1. <?php
  2. $load_address = 'billing';
  3. $address = WC()->countries->get_address_fields(get_user_meta(get_current_user_id(), $load_address . '_country', true), $load_address . '_');
  4. ?>
  5. <form method="post">
  6.  
  7.     <h3><?php echo apply_filters('woocommerce_my_account_edit_address_title', $page_title); ?></h3>
  8.  
  9.     <?php do_action("woocommerce_before_edit_address_form_{$load_address}"); ?>
  10.  
  11.     <?php foreach ($address as $key => $field) : ?>
  12.  
  13.         <?php woocommerce_form_field($key, $field, !empty($_POST[$key]) ? wc_clean($_POST[$key]) : $field['value'] ); ?>
  14.  
  15.     <?php endforeach; ?>
  16.  
  17.     <?php do_action("woocommerce_after_edit_address_form_{$load_address}"); ?>
  18.  
  19.     <p>
  20.         <input type="submit" class="button" name="save_address" value="<?php esc_attr_e('Save Address', 'woocommerce'); ?>" />
  21.         <?php wp_nonce_field('woocommerce-edit_address'); ?>
  22.         <input type="hidden" name="action" value="edit_address" />
  23.     </p>
  24.  
  25. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement