Reserve Your Free Seat for Our Next WooCommerce Class! Search
Business Bloomer
  • Business Bloomer Club
  • WooCommerce Plugins
  • WooCommerce Tips
  • Log In
  • 0
  • Business Bloomer Club
  • WooCommerce Plugins
  • WooCommerce Tips
  • Log In
  • Search
  • Contact
  • Cart
WooCommerce Code Snippets Emails My Account

WooCommerce: Disable “Password Changed” Administrator Emails

Last Revised: Aug 2023

STAY UPDATED

The “Password Changed” email is – actually – a WordPress core notification. It goes to admins when a WordPress user changes their password, and the email body says something along the lines of “Password changed for user: XYZ“.

So, why are we saying this email notification can be stopped if you run a WooCommerce website? Well, because WooCommerce provides us developers with a handy filter, that we can use for this exact reason.

For what concerns my own experience, I use Sendgrid to deliver Business Bloomer WordPress/WooCommerce emails – and on the free plan I have a limit of 100 daily emails. Which means I needed to find a way to reduce the number of email notifications.

Today we’ll cover the “Password Changed” one – let’s see how to stop administrators from getting them!

Here’s the not-very-helpful email that WooCommerce/WordPress admins get when a user resets their password. If you wish to get rid of them, use the 1-liner below!

PHP Snippet: Disable “Password Changed” Admin Email Notification (WordPress)

The WooCommerce plugin comes with this handy function, which triggers on the My Account page:

/**
 * Handles resetting the user's password.
 *
 * @param object $user     The user.
 * @param string $new_pass New password for the user in plaintext.
 */
public static function reset_password( $user, $new_pass ) {
	do_action( 'password_reset', $user, $new_pass );

	wp_set_password( $new_pass, $user->ID );
	self::set_reset_password_cookie();

	if ( ! apply_filters( 'woocommerce_disable_password_change_notification', false ) ) {
		wp_password_change_notification( $user );
	}
}

This means we can use the ‘woocommerce_disable_password_change_notification‘ filter if we wish to disable the Password Changed emails:

/**
 * @snippet       Disable "Password Changed" Admin Emails
 * @how-to        businessbloomer.com/woocommerce-customization
 * @author        Rodolfo Melogli, Business Bloomer
 * @compatible    WooCommerce 8
 * @community     https://businessbloomer.com/club/
 */

add_filter( 'woocommerce_disable_password_change_notification', '__return_true' );

Where to add custom code?

You should place custom PHP in functions.php and custom CSS in style.css of your child theme: where to place WooCommerce customization?

This code still works, unless you report otherwise. To exclude conflicts, temporarily switch to the Storefront theme, disable all plugins except WooCommerce, and test the snippet again: WooCommerce troubleshooting 101

Related content

  • WooCommerce: Separate Login, Registration, My Account Pages
    There are times when you need to send logged out customers to a Login page and unregistered customers to a standalone Register page. As you…
  • WooCommerce: Add New Tab @ My Account Page
    One of the features of Business Bloomer Club is the provision of Premium WooCommerce Q&A Support to supporters who enroll. So, how to add an…
  • WooCommerce: Add Content to a Specific Order Email
    Customizing WooCommerce emails via the WordPress dashboard is not easy and – sometimes – not possible. For example, you can’t edit or add content to…
  • WooCommerce: How To Make A Website GDPR Compliant? (12 Steps)
    Ok, we all know that the EU General Data Protection Regulation (GDPR) will come into force on the 25th May 2018. So the main question…
  • WooCommerce: How to Add a Custom Checkout Field
    Let’s imagine you want to add a custom checkout field (and not an additional billing or shipping field) on the WooCommerce Checkout page. For example,…

Rodolfo Melogli

Business Bloomer Founder

Author, WooCommerce expert and WordCamp speaker, Rodolfo has worked as an independent WooCommerce freelancer since 2011. His goal is to help entrepreneurs and developers overcome their WooCommerce nightmares. Rodolfo loves travelling, chasing tennis & soccer balls and, of course, wood fired oven pizza. Follow @rmelogli

4 thoughts on “WooCommerce: Disable “Password Changed” Administrator Emails”

  1. Shelley Tomich
    March 20, 2024

    Has anyone reported this doesn’t work? I added it to my functions.php but the emails are still being sent.

    Reply
    1. Rodolfo Melogli
      April 18, 2024

      Hi Shelley, just checked and Woo still comes with this filter, so my code still works. It must be something else

      Reply
  2. Pritam
    August 11, 2023

    We encountered an error activating your snippet, please check the syntax and try again. Error message: syntax error, unexpected token public, expecting end of file

    This is not working. Showing errors.

    Reply
    1. Rodolfo Melogli
      August 14, 2023

      Hello Pritam! You only need to paste the add_filter line, and not the previous function that is only there togive some context. Can you please let me know?

      Reply
Questions? Feedback? Customization? Leave your comment now!
_____

If you are writing code, please wrap it like so: [php]code_here[/php]. Failure to complying with this, as well as going off topic or not using the English language will result in comment disapproval. You should expect a reply in about 2 weeks - this is a popular blog but I need to get paid work done first. Please consider joining the Business Bloomer Club to get quick WooCommerce support. Thank you!

Cancel reply

Your email address will not be published. Required fields are marked *


Search WooCommerce Tips

Popular Searches: Visual Hook Guides - Checkout Page - Cart Page - Single Product Page - Add to Cart - Emails - Shipping - Prices - Hosting

Recent Articles

  • WooCommerce: Redirect Empty Paginated Category Pages (404)
  • WooCommerce: Complete Button @ Order Admin
  • WooCommerce: Allow Guest Checkout For Existing Customers
  • WooCommerce: Simplify Free Checkout
  • WooCommerce: Inject Ad After the nth Product @ Shop Page

Latest Comments

  1. Rodolfo Melogli on WooCommerce: Prevent Duplicate Orders
  2. Rodolfo Melogli on WooCommerce: Remove “Get the app” Ad @ Admin Order Emails
  3. Rodolfo Melogli on WooCommerce: Failed Orders Monitor & Temporary Lockdown

Find Out More

  • Become a WooCommerce Expert
  • Business Bloomer Club
  • WooCommerce Blog
  • WooCommerce Weekly
  • Contact

Contact Info

Ciao! I'm Rodolfo Melogli, an Italian Civil Engineer who has turned into an international WooCommerce expert. You can contact me here:

Twitter: @rmelogli

Get in touch: Contact Page

Business Bloomer © 2011-2025 - VAT IT02722220817 - Terms of Use - Privacy Policy

Cart reminder?

x