Skip to content

Commit

Permalink
fixes #346
Browse files Browse the repository at this point in the history
  • Loading branch information
levansy2020 committed Oct 31, 2015
1 parent cff2310 commit 60e5f86
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion classes/wc-gateway-paypal-express-angelleye.php
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,7 @@ function paypal_express_checkout($posted = null) {
if (isset($_POST) || ($this->skip_final_review == 'yes' && get_option('woocommerce_enable_guest_checkout') === "yes" && apply_filters( 'woocommerce_enable_guest_checkout', get_option('woocommerce_enable_guest_checkout')))) {
$result = unserialize(WC()->session->RESULT);
/* create account start */
if (isset($_POST['create_act']) && !empty($_POST['create_act'])) {
if (isset($_POST['createaccount']) && !empty($_POST['createaccount'])) {
$this->customer_id = apply_filters('woocommerce_checkout_customer_id', get_current_user_id());
$create_user_email = $_POST['email'];
$create_user_name = sanitize_user( current( explode( '@', $create_user_email ) ), true );
Expand All @@ -936,6 +936,9 @@ function paypal_express_checkout($posted = null) {
} elseif (get_user_by('email', $create_user_email) != false) {
wc_add_notice(__('This email address is already registered.', 'paypal-for-woocommerce'), 'error');
$create_acc_error = true;
} elseif (empty($_POST['create_act'])) {
wc_add_notice(__('Password is required.', 'paypal-for-woocommerce'), 'error');
$create_acc_error = true;
} else {
$username = !empty($create_user_name) ? $create_user_name : '';
$password = !empty($_POST['create_act']) ? $_POST['create_act'] : '';
Expand Down

0 comments on commit 60e5f86

Please sign in to comment.