WooCommerce: Skip Product & Cart Pages

Remi | September 27, 2013 | in WooCommerce

That’s a common issue some of you (WooCommerce users) face: how to click on one single button to add a product to the cart without even visiting the product page and skip the cart page to be directly redirected to the checkout page.

Let’s say you sell a ebook, and you lost potential sales during the Home Page > Product Page > Cart Page > Checkout Page funnel… Well this can be avoided by adding a link on the homepage and being redirected to the checkout directly with the product being added to the cart automatically.

To do it, simply add a link on your homepage (why not in the header?) and use a URL having this structure:


Where you replace 37 by the product ID.

Then add this snippet to the functions.php file within your theme folder, and tada ! The magic appears !

The author

About the author Remi: Hey! My name is RĂ©mi Corson, i'm a WordPress Expert Developer, i create high level themes and plugins, and i provide free stuff every week on this website!


  1. soralsokal

    Hi Remi,

    on my quest I found your article on skipping the product page.

    I actually want to have an “add to cart” button, but also show the product options next to it. Any idea, how to accomplish this?


  2. roman

    Hi Remi,

    This saved my life. Unfortunately, though, it causes Woocommerce to add the product twice to the cart. I tried the “sell this product individually” setting but then the link no longer works and redirects to the home page instead.

    Is there anyway to only have it add one product to the account?

    1. burnbright

      Hello, Remi. I am seeing something similar with the redirect. If users add a product to their cart, then navigate to a different page, and then try to re-add a subscription product to their cart, the user is redirected to the home page.

      Any thoughts on how to fix this?

      Thanks in advance for your help!


  3. dreadedhamish

    Can I skip the cart and checkout completely?
    Use case: I have some virtual free products. I don’t want them to be external products because I want the metrics woocommerce supply.

    So my logic would be “If virtual without add-on” then “complete checkout”. All users are registered already.

    Do you think I can combine this method and the code you had for removing fields from the checkout for virtual products, and end up with a shop that auto-emails you the download when you click on BUY, but puts you through checkout if it’s a product with an add-on or non-virtual?


  4. crazyyy

    Hello there, Remi. I’ve done everything as you mentioned above, the link appears where it should be, but when i click on it, i am getting log out and redirected on my homepage. Any suggestions? Thanks in advance.

  5. labowc

    sorry if my question goes beyond the scope of this post..
    here my problem:
    i would like to bypass cart and checkout of my site and link the “add to cart” button to an url maked “ad hoc” with the variables of my variable products.
    is it possible? how? does exists plugins or extensions that do it? can you give-me some examples of code that do it?
    thanks for the attention.

  6. Vlietson

    Hi Remi,

    Sounds perfect, did everything you said. But I will get the message: Your Cart is empty. So no product is automatically added to the cart. Could you help me to fix this? Thanks

  7. shishirumrao

    Hi Remi,

    I got a similar problem as above. But this happens only for guests, i.e, when any guest adds the product to cart, it redirects to cart page saying “cart is empty”.

    But for registered users it works perfect.

    Any idea how to fix for guests ??


  8. tlearyus

    Remi I simply want to redirect the product links so that they go to a custom URL that I can set for each product. i.e. I don’t want to use the default Woocommerce shop.

    I have searched for hour trying work out how to do this but can’t seem to find a way that works.

    Any solution would be greatly appreciated.

  9. ewoah

    It seems this functionality broke since I updated to the lastest version of woocommerce. The product does get added to the cart, but It doesn’t redirect me to the checkout page. Any idea for a solution?


  10. therawjuicery

    Hi Remi,

    I want to skip the Product and Cart page (Custom Page -> Checkout) but what this post suggests to do does not work and only forwards the customer to the home page. I know this post is outdated. Is there a fix that is relevant today that you may have up your sleeve? Thank you very much for your time and have a great day.

  11. Pingback: WooCommerce – Skip Product Page go Straight to Cart | Hannah Bock

Leave a reply