How to Redirect Buyers to WooCommerce Cart from a Pricing Table Button

>How to Redirect Buyers to WooCommerce Cart from a Pricing Table Button
  • buy button

This post was last updated on 7/9/2018

WooCommerce was created mainly for online shopping websites, but a lot of people use it for other types of products as well.

So some of you might have one or two products/services that you offer, and you just want a simple pricing table that will send the customer straight to the WooCommerce cart once he presses the “Buy” button, without having to go to the products page first.

Also, the fewer actions a buyer performs before purchasing a product or service, the better! You can lose customers if you put them to click 10 times before purchasing something.

Note that, in this article, I’m talking about pricing tables, not the grid of products from the WooCommerce’s shop page:

WooCommerce productspricing tables

Some of you may wonder if you can send customers straight to the cart part after they press the “Add to cart” button found on the WooCommerce products.

Yes, you can! All you need to do is to:

Go to WooCommerce -> Settings -> Products -> General -> check Redirect to the cart page after successful addition and Enable AJAX add to cart buttons on archives.

woocommerce add to cart behaviour

Now let’s get to our main topic.

You might also want to learn:

Redirect clients to cart from the pricing table button

If your theme doesn’t come with a built-in pricing table feature, you’ll have to use a plugin, of course. Here’s a list of some of the best pricing tables, both free and premium.

Now, the first thing you need to do is to find out your product(s) ID. In order to do that, go to your WooCommerce products and just hover your mouse cursor over the product whose ID you want to find out:

WooCommerce product ID

If for some reason it doesn’t display, try one of these methods to find the ID.

Now that you know your product(s) ID, you have to insert the URL that will redirect buyers straight to the WooCommerce cart.

The URL will contain your domain (e.g., followed by ?add-to-cart= and your product’s ID after “=”.

So, let’s say your product ID is 207. The URL that you’ll have to insert into one of the pricing table buttons is

Easy pricing tables plugin

Of course, instead of “”, you’ll have to add your own domain name.

Update: Tony said in the comments that for him it just refreshes the page, it doesn’t add the product in the cart.

In most cases, this happens because “Enable AJAX add to cart buttons on archives” isn’t checked in WooCommerce -> Products -> Add to cart behavior, as you can see in the above image. So make sure you check that too.

That’s it! Now when the client will pres the “Buy” button, or whatever you want to call it, he will be redirected straight to the cart page!

You might also want to learn:

WP Rocket - WordPress Caching Plugin
By |2018-10-24T14:16:31+00:00September 21st, 2015|Plugins, Tips|22 Comments


  1. Rohit Gaur April 15, 2017 at 5:04 PM - Reply

    I spent my whole day today finding the way to add correct link to my pricing table. Google – YouTube – Blogs – and what not

    No one mentioned about ‘Redirect to the cart page after successful addition’ option.

    I am glad that my Google Search brought to me here. Thanks so much for sharing what you knew.

  2. Vikas Kumar July 27, 2017 at 6:11 AM - Reply

    Love you dude.

    I was searching for this very long time but not got by searching. Someone suggested me on facebook.

    Thanks dude for writing awesome guide.

  3. LevineJudah October 26, 2017 at 12:47 PM - Reply

    SO helpful. and straightfoward Thank you!!

  4. Victor November 29, 2017 at 6:30 PM - Reply

    Thanks for sharing this beautiful article. Its really help me to sort out my issue

  5. Susan February 1, 2018 at 2:13 AM - Reply

    Thanks so much for the info.. Helpful indeed. But got one question though. What if I need to collect information from client? Like for example, these options. Input Domain URL, Service Needed.. I’d be great if I get a reply. Thanks

    • ThemeSkills February 2, 2018 at 12:08 AM - Reply

      Hello! Additional information is collected via checkout process, after the cart part, through shipping details or billing details, and whatever additional information you want to ask for there.

  6. Shashank Singh February 22, 2018 at 6:58 AM - Reply

    Hey i have followed this method but the quantity of product added to the cart is increased from 1 to 2 by default.

    • ThemeSkills February 22, 2018 at 7:32 AM - Reply

      Hello! It’s got nothing to do with the redirection itself. You either have a default setting that adds 2 products by default, instead of 1, or you already had one product in the cart. If you have one product, then click add to cart again, it doubles the quantity.

  7. Ariel March 4, 2018 at 7:31 PM - Reply

    Thanks for this. I have a product with the limitation of only one for each purchase. The problem is that if the costumer allready clicked the buy button in the sell letter, and then do not follow the buying process, when he come back to the sell letter and hit the buttom again, he is send to the home page!

    • ThemeSkills March 5, 2018 at 10:31 AM - Reply

      Hello! This could be caused by your 1 product per purchase limitation. This will also happen if the buyer would press the “Add to Cart” button directly from the product page, since it uses the same link. If they already have the product in the cart, they should access the cart directly, if they want to continue the purchase. Adding the same product in the cart, especially when you have the 1 product limitation, could trigger an error or send them somewhere else.

  8. Nicholas Muir March 16, 2018 at 10:40 AM - Reply

    Fantastic article, very helpful thanks

  9. Tony March 29, 2018 at 4:56 PM - Reply

    Hi themeskills.

    THis works when i am loggin into wordpress, but when viewing the website in incognito mode/ or logged out of wordpress when i click the “buy now button” with the new link as directed in this article, then the page just refreshes. do you know why?

    • ThemeSkills March 30, 2018 at 5:40 AM - Reply

      Hello! The only thing that I can think of, without further investigation, is that you don’t have “Enable AJAX add to cart buttons on archives” checked as well. Make sure to clear your site and browser caches as well, or check it in incognito again.

      If you had it checked already, then do you happen to have any features enabled which only allow logged in users to purchase products?

  10. OLIVER May 18, 2018 at 12:00 PM - Reply

    Very Important information, It really helped me.

  11. Obinna Mbila July 9, 2018 at 5:35 PM - Reply

    I have done this as shown on this post but some of the products when clicked will refresh me to the homepage and not the cart. why so?

    • ThemeSkills July 9, 2018 at 5:50 PM - Reply

      Hello! Have you also checked “Enable AJAX add to cart buttons on archives”?

  12. Aribest August 9, 2018 at 12:14 PM - Reply

    Very straight to the point article but meanwhile,i tried all what you said in this article but each time i clicked on the BUY BUTTON it only refreshes the page in which i ticked on the ADD TO CART BEHAVIOUR ITEMS.

    Please what else should i do now please?

    • ThemeSkills August 9, 2018 at 12:34 PM - Reply

      Hello! Well, if you did everything right, as pointed out in the post, it might be a theme or plugin feature that prevents this to work.

  13. Moses October 29, 2018 at 12:15 AM - Reply

    The best instructor. big up radu

    • ThemeSkills October 29, 2018 at 7:12 PM - Reply

      Thanks! 😀

  14. Alexandru November 14, 2018 at 1:50 PM - Reply

    Have checked both “Enable AJAX add to cart buttons on archives” and ‘Redirect to the cart page after successful addition’ with the following syntax : and will STILL refresh the page without nothing done.

    • ThemeSkills November 14, 2018 at 2:20 PM - Reply

      The comments are held for moderation, that’s why they don’t appear instantly.

      If it doesn’t work, then the theme or a plugin prevents it from working.

      The only way to verify that is to disable all the plugins, then clearing the website and browser cache. If it works, then enable the plugins and start disabling them one by one until you find the culprit. Clear the cache after each plugin deactivation.

      If it doesn’t work after disabling the plugins, then switch to a default WordPress theme (e.g. Twenty Seventeen). Clear the browser and website cache and try again.

      I recommend backing up your website before doing this.

      Also, if you didn’t add http:// or https:// to your link, you should add it.

Leave A Comment


- Get guides and offers right into your inbox -

The type of emails that you would like to receive (multiple selection allowed):

You can unsubscribe at any time by clicking the link in the footer of the emails. For more information, please check the privacy policy.

I use MailChimp as my emailing service. By subscribing, you understand that your email and preferences will be transferred to MailChimp. Learn more about MailChimp's privacy practices here.