extra actions for checkout. @8cc310c14ab55131a79f4340a37ef392283fc3ab

This commit is contained in:
Mike Jolley 2012-04-10 18:21:33 +01:00
parent 85c42f00ed
commit a9a5f0ceca
2 changed files with 8 additions and 1 deletions

View File

@ -289,6 +289,9 @@ class WC_Checkout {
// Change role
wp_update_user( array ('ID' => $user_id, 'role' => 'customer') ) ;
// Action
do_action( 'woocommerce_created_customer', $user_id );
// send the user a confirmation and their login details
$mailer = $woocommerce->mailer();
@ -297,7 +300,7 @@ class WC_Checkout {
// set the WP login cookie
$secure_cookie = is_ssl() ? true : false;
wp_set_auth_cookie($user_id, true, $secure_cookie);
else :
$woocommerce->add_error( $reg_errors->get_error_message() );
break;

View File

@ -35,6 +35,8 @@ global $woocommerce;
<?php endif; ?>
<?php do_action( 'woocommerce_before_checkout_registration_form', $checkout ); ?>
<div class="create-account">
<p><?php _e('Create an account by entering the information below. If you are a returning customer please login with your username at the top of the page.', 'woocommerce'); ?></p>
@ -46,5 +48,7 @@ global $woocommerce;
<?php endforeach; ?>
</div>
<?php do_action( 'woocommerce_after_checkout_registration_form', $checkout ); ?>
<?php endif; ?>