diff --git a/plugins/woocommerce/changelog/49737-fix_add_login_in_reset_pass_emails b/plugins/woocommerce/changelog/49737-fix_add_login_in_reset_pass_emails new file mode 100644 index 00000000000..fd884039ac5 --- /dev/null +++ b/plugins/woocommerce/changelog/49737-fix_add_login_in_reset_pass_emails @@ -0,0 +1,4 @@ +Significance: minor +Type: enhancement + +Add username in email reset-password link \ No newline at end of file diff --git a/plugins/woocommerce/templates/emails/customer-reset-password.php b/plugins/woocommerce/templates/emails/customer-reset-password.php index d2b62cfc10f..8549bcdfa79 100644 --- a/plugins/woocommerce/templates/emails/customer-reset-password.php +++ b/plugins/woocommerce/templates/emails/customer-reset-password.php @@ -12,7 +12,7 @@ * * @see https://woocommerce.com/document/template-structure/ * @package WooCommerce\Templates\Emails - * @version 4.0.0 + * @version 9.3.0 */ if ( ! defined( 'ABSPATH' ) ) { @@ -31,7 +31,7 @@ if ( ! defined( 'ABSPATH' ) ) {
- +
diff --git a/plugins/woocommerce/templates/emails/plain/customer-reset-password.php b/plugins/woocommerce/templates/emails/plain/customer-reset-password.php index 4f824ee7f57..08db2454566 100644 --- a/plugins/woocommerce/templates/emails/plain/customer-reset-password.php +++ b/plugins/woocommerce/templates/emails/plain/customer-reset-password.php @@ -12,7 +12,7 @@ * * @see https://woocommerce.com/document/template-structure/ * @package WooCommerce\Templates\Emails\Plain - * @version 3.7.0 + * @version 9.3.0 */ defined( 'ABSPATH' ) || exit; @@ -28,7 +28,7 @@ echo sprintf( esc_html__( 'Someone has requested a new password for the followin /* translators: %s: Customer username */ echo sprintf( esc_html__( 'Username: %s', 'woocommerce' ), esc_html( $user_login ) ) . "\n\n"; echo esc_html__( 'If you didn\'t make this request, just ignore this email. If you\'d like to proceed:', 'woocommerce' ) . "\n\n"; -echo esc_url( add_query_arg( array( 'key' => $reset_key, 'id' => $user_id ), wc_get_endpoint_url( 'lost-password', '', wc_get_page_permalink( 'myaccount' ) ) ) ) . "\n\n"; // phpcs:ignore +echo esc_url( add_query_arg( array( 'key' => $reset_key, 'id' => $user_id, 'login' => rawurlencode( $user_login ) ), wc_get_endpoint_url( 'lost-password', '', wc_get_page_permalink( 'myaccount' ) ) ) ) . "\n\n"; // phpcs:ignore WordPress.Arrays.ArrayDeclarationSpacing.AssociativeArrayFound echo "\n\n----------------------------------------\n\n";