Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Is it still possible to send passwords in New account created emails?

$
0
0

Replies: 0

Hi,

I have trouble sending people automatically created passwords in their emails.

In WooCommerce settings, I have a checkmark at „Create user password auttomatically“, each new client is therefore assigned a password automatically.

Then, in the Customer new account email, I had a line

Your password has been automatically generated: %s

However, instead of the showing the password, the appropriate part of the Customer new account email that customers get contains instead a link to reset their password, not the password itself.

After investigation, I found that WooCommerce has changed the code for serving the password in 6.0:

OLD CODE

<?php if ( 'yes' === get_option( 'woocommerce_registration_generate_password' ) && $password_generated ) : ?>

	<p><?php printf( __( 'Your password has been automatically generated: %s', 'woocommerce' ), '<strong>' . esc_html( $user_pass ) . '</strong>' ); ?></p>

<?php endif; ?>

NEW CODE (Since WooCommerce 6.0)

// Only send the set new password link if the user hasn't set their password during sign-up.
if ( 'yes' === get_option( 'woocommerce_registration_generate_password' ) && $password_generated && $set_password_url ) {
	/* translators: URL follows */
	echo esc_html__( 'To set your password, visit the following address: ', 'woocommerce' ) . "\n\n";
	echo esc_html( $set_password_url ) . "\n\n";
}

Is there something I can do to actually send the password to the customer in the Customer new account email … or do I need to find another way?

Or has the ability to send people their passwords been deprecated?

Thanks


Viewing all articles
Browse latest Browse all 59525

Trending Articles