From 687197f234ce96c4eec2ee2715240d9a48ab2ab1 Mon Sep 17 00:00:00 2001 From: rgjchandler Date: Mon, 15 Jul 2019 16:00:13 +0100 Subject: [PATCH] Fix #24153 - Added filter to disable password change notification --- includes/shortcodes/class-wc-shortcode-my-account.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/shortcodes/class-wc-shortcode-my-account.php b/includes/shortcodes/class-wc-shortcode-my-account.php index 3099aaba0a7..e6306225319 100644 --- a/includes/shortcodes/class-wc-shortcode-my-account.php +++ b/includes/shortcodes/class-wc-shortcode-my-account.php @@ -376,7 +376,9 @@ class WC_Shortcode_My_Account { wp_set_password( $new_pass, $user->ID ); self::set_reset_password_cookie(); - wp_password_change_notification( $user ); + if ( ! apply_filters( 'woocommerce_disable_password_change_notification', false ) ) { + wp_password_change_notification( $user ); + } } /**