Posted on 4 Comments

How To Fix Add To Cart Button Not Showing In WooCommerce Product Page

add to cart button missing woocommerce

So you’ve decided to use WooCommerce to power your store, great! You got it installed, created your first product and clicked on the product link with excitement. However, all you see is this:

add to cart button is not showing on woocommerce

Where is the add to cart button? You wonder. How can someone buy your product without that button?

Don’t panic! This issue is quite popular and quite simple to fix too. Let’s find out why your add to cart button is not showing and how can you fix.

Why your add to cart button is not showing

The reason why you don’t see the add to cart button on your product page is because your theme doesn’t support WooCommerce. It sounds strange to you but not all themes out there support WooCommerce.

When you started your site, you might not expect to sell anything. For example, you started a blog to write about your favorite topics. Your intention was to share the idea. You didn’t anticipate one day you’ll sell a book on your site.

And that’s normal. Our lives are filled with surprises.

So, what can you do about this? Let’s discuss the solutions.

How to get the add to cart button to show up on your WooCommerce product page

There are two solutions for this problem. As the cause is your theme lack WooCommerce’s support, you may see the first solution is to change to one that supports WooCommerce. That’s the best solution, if you can afford it.

Changing theme for your site is easy when you haven’t done much customization based on your current theme. However, if you have built a child theme to extend your current theme’s functionalities, changing it to something else can be very expensive.

Even when you don’t have many attachments with the current theme, finding a new theme can take days.

So, in case you can’t change or don’t want to change your current theme, read on.

Fix add to cart button not showing by customize your theme file

You are about to enter some code but don’t worry, it’s very simple. Let’s go to Appearance->Theme Editor. You may see a dialog says be careful. Click on I understand and proceed.

Now, look at the right side. You’ll see something similar to this (chances are you are using a different theme so the list of the files are not identical):

current-theme-files
current-theme-files

Pay attention to these two files:

  1. single.php
  2. index.php

If you see single.php, click on that. Otherwise, click on index.php

Since my theme has single.php file, I click on that. Yours could be different. However, it should contain the line starts with get_template_part as I highlighted in the screenshot below:

edit wordpress template file

now copy that line and replace it with the following code:

if ( is_singular( 'product' ) ) {

    wc_get_template_part( 'content', 'single-product' );

} else {
    //paste the line you copied here (replace the whole line, including //)
}

Make sure you replace your own line (the one you copied) to the second block.

In my case, my code would look like this:

if ( is_singular( 'product' ) ) {

    wc_get_template_part( 'content', 'single-product' );

} else {
    wc_get_template_part( 'content', 'single-product' );
}

Finally, save the file. Let’s check out my product again.

add to cart button show up on product page

As you can see, the add to cart button appears. I also have the PayPal button appears since I installed PayPal gateway plugin.

Conclusion

As you can see, it is quite simple to fix add to cart button not showing up on your product page. However, even when it is fixed, the product page’s appearance may not be what you like. In that case, you may need to hire someone to customize that page for you. Any decent WordPress developers would be able to do that for you.

Posted on Leave a comment

The Ultimate Fix To WooCommerce Not Sending Email Notifications Problem (For FREE)

sending emails woocommerce

If you are serious about your WooCommerce store then the emails sending function is very important. Most of the time, you send emails to your customers following their purchases, their contact form submissions. You may also send emails contain coupons to your customers on their birthday. You also need to get emails regarding your store status. None of those things happen if you have WooCommerce not sending emails problem.

The prevalent of emails problems in WooCommerce (and WordPress)

By default, WooCommerce uses the wp_mail function of WordPress to process its emails. wp_mail in turn based on the mail function of PHP (the programming language that made WordPress). Without proper configurations, the mail function rarely works. On the occasions it does, most of your emails will go to spam folder. In fact, most sites use default mail settings, which make the mail sending success rate pretty low.

How to fix WooCommerce not sending emails

As you can see, WooCommerce has nothing to do with deliverability of its emails since it utilizes the function from WordPress. So, the right question to ask is how to fix WordPress not sending emails.

Fortunately, the fix is quite simple.

Let’s get started.

Step 1: Get a free email (gmail, mail.ru…)

The first step is to register an email. The reason is we are going to use the mail server of those email providers (gmail, mail.ru) to send our emails, not our host’s server. Using those email providers’ servers increases email deliverability (the success rate of sending email) greatly.

Step 2: Get the STMP configuration of your email

The configurations depend on the email service you use. For example, Gmail SMTP settings would be:

  • Server address: smtp.gmail.com
  • username: Your Gmail address (for example, [email protected])
  • password: Your Gmail password (or app password)
  • SMTP port  587 (TLS)/465 (SSL)
  • TLS/SSL required: Yes

If you use a different provider, you can search for provider + “smtp settings” to get the right configurations.

In the case of Gmail, if you want to use SMTP settings, you may need to disable two-steps authentication or create an app password

Now, you got the configurations. Let’s move to the next step:

Step 3: Install Easy WP SMTP plugin

Our next step would be installing Easy WP SMTP plugin (click on the link to download or you can install from your dashboard). It’s a plugin that let you specify the SMTP settings then wp_mail will use the mail server you put in this plugin to send email instead of your website’s host.

Now you have the plugin installed and activated, click on the settings link under its name:

click on easy wp smtp settings to start configure smtp

You’ll see the page where you put all the details as below:

The Ultimate Fix To WooCommerce Not Sending Email Notifications Problem (For FREE) 1
The Ultimate Fix To WooCommerce Not Sending Email Notifications Problem (For FREE) 2

As you can see that, I use an account from mail.ru. However, with other email providers, you can enter the same details except these fields:

  • From email address: that’s your email address
  • From name: this is what your customers see in the sender name of your email. So, pick something that represents your store
  • Reply to email address: When the recipients hit the reply button, which email will receive that reply. This could be a different email, maybe your dedicated email to handle supports
  • SMTP host: the smtp server you got from Step 2 above
  • SMTP user name: your email
  • SMTP password: your email’s password (or app password in case of Gmail)

Now, with all the info entered, click on save changes.

Step 4: Test your email settings

The final step would be testing if the configuration works. Still in Easy WP SMTP, click on test email.

send test email to confirm smtp settings work

Enter a valid recipient in the To field and some dummy text in subject and message field then click on Send test email. If your setup is correct, you’ll see the email goes through:

email sent successfully

As you can see, I got the test email in my other account.

Conclusion

Emails are still very important for any ecommerce store. In fact, it’s the main channel to communicate with your customers. If your WooCommerce store fails to send emails, that’s a big problem. Hopefully, the tutorial I made it this post can help you fix WooCommerce not sending emails problem. Notice that free email services have their limits on how many emails you can send per day (500 in the case of Gmail). If you go pass that limit, exceeding emails will not be sent. In that case, you may want to use a dedicated email service such as Amazon SES or Sendgrid to deliver your emails.