How to Disable WooCommerce New Order Emails

How to Disable WooCommerce New Order Emails

WooCommerce has very powerful notification features. These are mostly built around the idea of sending emails whenever certain actions take place. One of the most common causes for these notifications to be sent is when a new order is placed. WooCommerce will send your store managers, or admins, an email when new orders come in and undergo changes. Of course, you might not always want these emails to go out. So, today, we’re going to discuss how to disable WooCommerce new order emails.

Before we get started, let’s review the various types of new order emails WooCommerce can send. As we said, these emails are triggered based on the status of the order. WooCommerce will send your store admins an email under the following new order status changes:

  • Pending to Processing
  • Failed to Processing
  • Pending to Completed
  • Failed to Completed
  • Pending to On-Hold
  • Failed to On-Hold

So there are six different scenarios in which WooCommerce can send out notification emails to your admins. Not all of these will be necessary for your business and you probably want to disable some of them.

Let’s go through the two ways you can disable WooCommerce new order emails. The first, and more complicated, involves creating a WordPress child theme and adding some custom code. The second, and much easier way, involves a simple plugin we’ve developed.

How to Turn Off WooCommerce New Order Emails with Code

In order to turn off new order emails yourself, you’ll need to learn how to write some basic PHP code. PHP is the language that powers WooCommerce and WordPress. Your code will disable new order emails from being issued by WooCommerce. We’ll go step-by-step through the proper and safe way to add code to a WooCommerce store. Our method will help prevent you from ruining your site in the process.

Important! Before you do major work on a website you should make a complete backup. We highly recommend using one of the many popular WordPress backup plugins to take care of this. Make sure your backup is complete: WordPress files (plugins, themes, core) and your site’s database. In case of a meltdown, you’ll want to have a proper backup to quickly and easily restore your site to working order.

Create a Child Theme

Before we do anything, you’ll need to create a WordPress child theme. In short, a child theme is the WordPress way to safely make modifications to an existing site’s theme. A child theme uses another theme (called the parent) as a foundation. Then, inside of the child theme, you make the changes you want to see reflected in the parent.

It’s done this way because modifying a parent theme directly is discouraged. It can lead to problems if you make a mistake, and any changes you make are lost in the next update the theme receives.

You can find a lot of good tutorials online about how to make a WordPress child theme. In fact, a lot of the most popular WordPress themes have ready-made child themes for you.

Add Code to the Child Theme

Once your child theme is made, it’s time to add some code to it. Open up the functions.php file in your child theme. Or, if it doesn’t exist already, create it yourself. You’re going to want to add the following code to the file:

add_action('woocommerce_email', 'my_disable_emails_new_orders', 10);
function my_disable_emails_completed_orders($email_class)
{
    remove_action('woocommerce_order_status_pending_to_processing_notification', [$email_class->emails['WC_Email_New_Order'], 'trigger']);
    remove_action('woocommerce_order_status_pending_to_completed_notification', [$email_class->emails['WC_Email_New_Order'], 'trigger']);
    remove_action('woocommerce_order_status_pending_to_on-hold_notification', [$email_class->emails['WC_Email_New_Order'], 'trigger']);
    remove_action('woocommerce_order_status_failed_to_processing_notification', [$email_class->emails['WC_Email_New_Order'], 'trigger']);
    remove_action('woocommerce_order_status_failed_to_completed_notification', [$email_class->emails['WC_Email_New_Order'], 'trigger']);
    remove_action('woocommerce_order_status_failed_to_on-hold_notification', [$email_class->emails['WC_Email_New_Order'], 'trigger']);
}

This is a pretty complicated set of PHP instructions. If you copy and paste this exactly into your functions.php file it will disable all new order emails. To pick and choose, you’ll only want to add the line of code that matches the notification you want to remove. Here are the line numbers that correspond to each new order email. Remember, keep the lines for the emails you want to disable. The rest you can delete:

  • 4: Pending to Processing
  • 5: Pending to Completed
  • 6: Pending to On-Hold
  • 7: Failed to Processing
  • 8: Failed to Completed
  • 9: Failed to On-Hold

Save the functions.php file when you are done adding the above pieces of code you need.

Getting lost? Creating your own child theme and inserting PHP code can be confusing. Most WooCommerce users don’t want to get this invovled. You can have this done for you by using our custom plugin solution. Learn how our Remove WooCommerce Features plugin can help you save time.

Upload the Child Theme

It’s time to get your child theme on your WooCommerce site. You’ll do this by uploading it directly to the site itself. First, compress the child theme’s folder into a .zip file. You’ll need to do this in order for WordPress to be able to handle the theme easily. Once that’s done, log in to your WordPress admin. You’ll want to go to Appearance and then Themes in the side menu of the admin. The Themes screen will allow you to upload your child theme right to the server.

Some technically-inclined people like to upload themes directly. You can accomplish this by using an FTP program. You will need to know the login information to access your site’s server via FTP. If you need help, most web hosting companies have documentation to assist you. Also, many high-quality hosts have well-trained support staff that can help.

Activate the Child Theme

Finally, it’s time to activate the child theme. This, in effect, “turns on” your theme and replaces it with the parent theme. Once again, head to Appearance and then Themes in the WordPress admin.

You should see your child theme amongst the list of themes on your site. If you do not, then something with the upload went wrong. Try again and double-check the child theme files. Eventually, the child theme will appear on the list. When it does simply press the button to activate it.

Activating your child theme will instantly disable WooCommerce new order emails that you have chosen from your store. If the emails continue to come in, or your site has broken, there is a problem with your PHP code. Go back into your child theme’s functions.php and look for mistakes. Correct what is wrong, package up the theme into a .zip file, and repeat the upload and activation process. Eventually, you’ll get things right and the email notifications will stop.

Mission accomplished! Of course, this was quite a lot of effort. In fact, most people who visit this site will have turned away long ago and given up. If you’ve made it this far, and aren’t willing to take on the above steps, we have a solution for you. Let’s discuss how you can take care of this in a much simpler fashion.

How to Remove WooCommerce New Order Emails the Easy Way

Remove WooCommerce Features can deal with removing WooCommerce new order emails for you automatically. You don’t have to learn about code, build a child theme, or find and pay a WordPress developer. After you have purchased and installed our plugin all you need to do is follow these steps.

Step #1

Go to the WooCommerce section of your WordPress installation’s admin menu and click the link that says Remove Features.

WooCommerce Admin Menu

Step #2

Find the setting for New Orders and click the checkbox so that it’s marked like so:

Remove WooCommerce Features - New Orders

Step #3

Press the button.

That’s all there is to it. After you save the settings, WooCommerce new order notification emails will be disabled on your site. With our plugin, Remove WooCommerce Features, the change will remain as long as the plugin is installed and activated.

Our plugin works with a lot of other WooCommerce features. It can be used for more than handling email notifications. The full list of features is available on our site: