Skip to content

Commit

Permalink
Add user's checkout details to their account when creating an account…
Browse files Browse the repository at this point in the history
… on checkout. Fixes #1928.
  • Loading branch information
JustinSainton committed Jul 6, 2015
1 parent 041517a commit 8364b38
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion wpsc-components/theme-engine-v2/mvc/controllers/checkout.php
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,11 @@ private function submit_payment_method() {

$email = wpsc_get_customer_meta( 'billingemail' );
$user_id = wpsc_register_customer( $email, $email, false );

$purchase_log->set( 'user_ID', $user_id );

wpsc_update_customer_meta( 'checkout_details', wpsc_get_customer_meta( 'checkout_details' ), $user_id );

update_user_meta( $user_id, '_wpsc_visitor_id', wpsc_get_current_customer_id() );
}

$purchase_log->save();
Expand Down

0 comments on commit 8364b38

Please sign in to comment.