Enhance Customer Email Password Reset include Login Username in Reset Password Link (#49737)
* Add login username in reset password links * Add changefile(s) from automation for the following project(s): woocommerce * Move login param as final query param * Bump template versions to 9.3.0 * `phpcs:ignore` should be specific * `phpcs:ignore` should be specific --------- Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
This commit is contained in:
parent
853c722b08
commit
26a6c9adba
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: enhancement
|
||||
|
||||
Add username in email reset-password link
|
|
@ -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' ) ) {
|
|||
<p><?php printf( esc_html__( 'Username: %s', 'woocommerce' ), esc_html( $user_login ) ); ?></p>
|
||||
<p><?php esc_html_e( 'If you didn\'t make this request, just ignore this email. If you\'d like to proceed:', 'woocommerce' ); ?></p>
|
||||
<p>
|
||||
<a class="link" href="<?php echo esc_url( add_query_arg( array( 'key' => $reset_key, 'id' => $user_id ), wc_get_endpoint_url( 'lost-password', '', wc_get_page_permalink( 'myaccount' ) ) ) ); ?>"><?php // phpcs:ignore ?>
|
||||
<a class="link" href="<?php 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' ) ) ) ); ?>"><?php // phpcs:ignore WordPress.Arrays.ArrayDeclarationSpacing.AssociativeArrayFound ?>
|
||||
<?php esc_html_e( 'Click here to reset your password', 'woocommerce' ); ?>
|
||||
</a>
|
||||
</p>
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
Loading…
Reference in New Issue