Skip to content

Commit

Permalink
Edit account form hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejolley committed Jul 2, 2014
1 parent 8b2c4a3 commit 12cf9ed
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions templates/myaccount/form-edit-account.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* @author WooThemes
* @package WooCommerce/Templates
* @version 1.6.4
* @version 2.2.0
*/

if ( ! defined( 'ABSPATH' ) ) {
Expand All @@ -16,6 +16,8 @@

<form action="" method="post">

<?php do_action( 'woocommerce_edit_account_form_start' ); ?>

<p class="form-row form-row-first">
<label for="account_first_name"><?php _e( 'First name', 'woocommerce' ); ?> <span class="required">*</span></label>
<input type="text" class="input-text" name="account_first_name" id="account_first_name" value="<?php echo esc_attr( $user->first_name ); ?>" />
Expand Down Expand Up @@ -47,8 +49,14 @@
</fieldset>
<div class="clear"></div>

<p><input type="submit" class="button" name="save_account_details" value="<?php _e( 'Save changes', 'woocommerce' ); ?>" /></p>
<?php do_action( 'woocommerce_edit_account_form' ); ?>

<p>
<?php wp_nonce_field( 'save_account_details' ); ?>
<input type="submit" class="button" name="save_account_details" value="<?php _e( 'Save changes', 'woocommerce' ); ?>" />
<input type="hidden" name="action" value="save_account_details" />
</p>

<?php wp_nonce_field( 'save_account_details' ); ?>
<input type="hidden" name="action" value="save_account_details" />
<?php do_action( 'woocommerce_edit_account_form_end' ); ?>

</form>

0 comments on commit 12cf9ed

Please sign in to comment.