Disable reset password notification
-
Hello,
We can’t understand why inside the
recurring/includes/wc-vipps-recurring-checkout.php > handle_payment()function you manually trigger thewoocommerce_reset_password_notificationhook.When we sign up for a subscription, we get three emails: New Customer, Reset Password and Order Details. The Reset Password email is redundant.
When we buy a non-subscription product, we get only New Customer and Order Details emails.
Please remove
do_action( 'woocommerce_reset_password_notification', $user_data->user_login, $key )at line 1064.—————————————————————
Also please standartise the way you generate new user names.
In
Vipps.class.phpit allows to filter the user name and provides the first/last name etc., which imho works better:$userdata = array('user_nicename'=>$name, 'display_name'=>"$firstname $lastname", 'nickname'=>$firstname, 'first_name'=>$firstname, 'last_name'=>$lastname);
// Add filter to allow other ways of creating usernames.
$newusername = apply_filters('woo_vipps_express_checkout_new_username', '', $email, $userdata, $order);
$customerid = wc_create_new_customer($email, $newusername, wp_generate_password(), $userdata);In
wc-vipps-recurring-checkout.phpthe user name usually consists of the first part of the email address:$username = wc_create_new_customer_username( $email );
$user_id = wc_create_new_customer( $email, $username, null );
You must be logged in to reply to this topic.