WooCommerce: Emails are not sending

One of the more frequent issues that we hear about day to day is that WooCommerce is not sending emails for new orders (or any emails at all). There are several reasons that this may be happening. The most common reason is that the status of order is such that an email is not going to be sent. Some times the email may not even be enabled, or the server is not sending the emails.

While we do have a great FAQ here, I wanted to quickly go over the reasons for emails not sending.

Something that is really good to know is that WooCommerce does not send emails. It creates emails to be sent by the server, but it does not send email. The same goes with WordPress. WordPress creates all kinds of emails, but WordPress does not send them. That’s the job of the server. This is important to understand for two reasons. 1. Knowing this helps you troubleshoot. 2. Knowing this helps you to understand the solutions.

WooCommerce Emails

The first thing you might want to do is get familiar with the WooCommerce Emails. Head over to WooCommerce -> Settings -> Emails and look over the Email notifications. Plugins that you install that create emails will be listed here as well, but for our example I have just a bare bones site installed with just WooCommerce. These are the default emails that come with WooCommerce as of version 3.4.3.

Looking at the first column you can see that there are checkmarks all the way down until we get to Customer note. I have disabled this email for our example. If you are not getting New order emails and you see the same greyed out “X”, then that’s why. For some reason the email has been disabled. The enable/disable box looks like this.

Order Status

If you click on the New order email you will see a message across the top that says “New order emails are sent to chosen recipient(s) when a new order is received.” Each email is going to have a similar message so that you know what to expect. This means that new order emails are sent when the new order is received and this email is going to the Store Owner or whoever else you have in that field. This does not go to the customer.

To get a better understanding of order in WooCommerce, please read this great bit of documentation. The emails your customer will receive when they place an order are these.

When an order is processing, your customer will receive an email, and when it’s completed, your customer will receive an email. It’s important to understand that if your customer is not getting an email that you want to check the status of their order. This may explain why no email was sent.

Sending Email

I mentioned earlier that WordPress and WooCommerce do not send email. That’s the job of the server hosting your site. WordPress and WooCommerce are responsible for creating the email and then handing those off to the server to deliver.

So how can you tell if your emails are being created but not sent? It’s actually pretty easy. You will want to install a Mail Logging plugin. What this will do is check a page for emails. Simple right? Just install the plugin, send a test order, then check the page. If there is an email there, then WooCommerce has created the email as expected. If not, then there is an issue with WooCommerce or possible a conflicting plugin. It’s important to know if the server is not sending the email or if WooCommerce is not creating them because your path forward is different depending on that.

WP Mail Logging is my mail logger of choice. It’s worth download and getting familiar with.

So let’s say you sent a test order through and the email shows up in the logs. Great. We know WooCommerce is doing what it should. But if customers are not getting their email, and you have already confirmed that it’s not stuck in a SPAM folder, then it’s time to move on to the next step.

Hosting or dedicated SMTP

When email is not sending, it’s time to check with your hosting provider. It’s very common for shared hosting to have email issues. In fact we really suggest that you go with a dedicated SMTP provider. This will bypass the server and use a dedicated service to send your emails, which is great because you do not have to depend on your hosting provider for something as important as emails. A dedicated SMTP (Simple Mail Transfer Protocol) is just that, it’s dedicated to sending your email.

If you prefer not to go this route, then you will at least want to report the email issue to your hosting provider and ask them to get it sorted. Let them know that you have logs that show emails are being created, that will help convince them to check their logs and do what they need to in order to get your email sending again.

Here are some dedicated SMTP providers. 

I hope this helps the next time email is not sending on your WooCommerce site. Any questions? Feel free to reach out!

WooCommerce Services and the Nexus: Tax calculations are not shown

In WooCommerce you can use WooCommerce Services to make tax calculations easier. This uses the TaxJar API to do that for you. Sometimes though, you will have everything configured correctly, but taxes still show as $0 or not at all on the front end of your site. This is often because there is no Nexus available.

To confirm this, make sure you have Automated Taxes enabled.

Now let’s check the logs to see if taxes are not calculating and showing because there is no Nexus.

Go to WooCommerce -> Status -> WooCommerce Services Tab and then scroll down to Taxes Log.

Look for this.

 06-13-2018 @ 15:21:52 - :::: TaxJar API called :::: (WCS Tax)
 06-13-2018 @ 15:21:52 - Received: {"tax":{"order_total_amount":12.0,"shipping":2.0,"taxable_amount":0.0,"amount_to_collect":0.0,"rate":0.0,"has_nexus":false,"freight_taxable":false,"tax_source":null}} (WCS Tax)

What we are interested in is this. "has_nexus":false,

If that is there, then there is no Nexus.

To understand what that means, take a look at these two articles.

  1. https://blog.taxjar.com/internet-sales-tax-nexus/
  2. https://www.taxjar.com/guides/intro-to-sales-tax/#determine-where-you-have-sales-tax-nexus ​

Which boil down to the following questions.

To determine if you have nexus, ask yourself these questions:
– Do I have a location, warehouse or other physical presence in a state?
– Do I have an employee, contractor, sales person, installer or other person working for me in a state?
– Do I have products stored in a state?
– Do I have a drop shipping relationship with a vendor in a state?
– Do I have an affiliate program with affiliates in various states?
– Do I cross state lines to sell my products at a trade show, craft fair or other event?

WooCommerce Image Size Settings

WooCommerce 3.3 Image Size Changes

WooCommerce 3.3 got some Image Size Improvements. You can read all about that here.

This has caused a little confusion because if a theme defines the image sizes then a few options disappear.

What once looked like this:

Now looks like this:

The change is that these two settings have been hidden.

Main image width and Thumbnail width

If you see these missing, this is because you are on WooCommerce 3.3+ and the theme you are using has defined these sizes already.

This is really great in that a Theme Developer can define the size of images that are best optimized for the theme they are creating. But if you are familiar with these settings and they seem to disappear, it can be a little frustrating.

You can still override these values and set your own values if you would like. Just use the following filter.


add_theme_support( 'woocommerce', array(
'thumbnail_image_width' => 150,
'single_image_width' => 322,
) );

Add that snippet to your theme’s functions.php file and change the values as you see fit.

I hope this helps. Thanks again for using WordPress and WooCommerce! (pssst … have you tried Jetpack yet? It’s awesome.)

Update 3.14.18
This is a really great article on this. Better than this one for sure. 🙂

WooCommerce Subscriptions Not Renewing

Often times WooCommerce Subscriptions will fail to renew for a recurring Subscription because Cron is either not working correctly on a site or because of this. For traffic based firing of Cron, I suggest using JetPack Monitor. It solves this limitation easily and effectively.

For troubleshooting when WooCommerce Subscriptions Not Renewing (or other Cron based scheduled events) I like to use WP Crontrol. It’s great for getting a better idea of what’s happening with your site’s Cron jobs and most times the plugin will print an error on the WP Crontrol configuration page that will give you the right direction to head in for troubleshooting. Often times you will need to work with your hosting provider to resolve the issue. If you are running your own server, then this will be the same error that shows up in system logs.

WooCommerce Subscriptions Can I Remove Product?

If I remove a product or a product variation from my store, will that effect past Subscriptions based on the product I removed?

I get this question a lot, and it makes sense. If you run out of stock, you don’t want to sell it anymore. Or what if you just want to discontinue a product, but still plan to sell it to folks who already have a Subscription?

The answer is yes, removing the product or variation will effect future Subscription renewals. Simply, they won’t renew. That’s because when the new order is created for the Subscription, the product the order is being created from does not exist and the process is halted. So the Subscription is not renewed.

But there are work arounds that should help.

First

First you can set the Catalog Visibility to Hidden. That will stop it from being shown. But that only works for Products, not variations.

Second

Secondly you can set the stock to 0. That way if someone does have direct link to the product or it’s a variation, they can’t actually order it. But Subscriptions will still renew and set the stock to -1. I double checked with the Developer to make sure. As longs as there is no custom code to stop this, then it will work.

WooCommerce Multiply all costs by person count

Today I had a really great question about the Multiply all costs by person count option in WooCommerce Bookings.

This can be a pretty confusing option. So no worries. If you got confused by this one, you are not alone.

So you check the check box next to Multiply all costs by person count thinking “great, now the price will be multiplied per person”. In our example the Alien person type is $1 per Alien.

Multiply all costs by person count

You head to the front end and you add one Alien person type to the booking. Great! $1. That’s what you expected. Then you add another Alien thinking it’s going to be $2, but it’s $4? How is 1X2 = 4?

Well of course it’s not. Here is what’s going on.

Ticket = $1

1 Ticket = $1
2 Tickets = $2
3 Tickets = $3

Vs.

Ticket = $1

1 Ticket = $1
2 Tickets = $4 ($2 per ticket X 2)
3 Tickets = $9 ($3 per ticket X 3)
4 Tickets = $16 ($4 per ticket X 4)

If you deselect the box next to Multiply all costs by person count, then the math will work as you expected. 1X2=$2. This is because with the option enabled, WooCommerce Bookings is multiplying all COSTS by the amount of persons. But by default Bookings will simply multiply each ticket by the amount of persons. Or in our case, Aliens. 🙂