Website Building » WooCommerce » How Do You Create a Link Direct to WooCommerce Checkout for 1 Specific Product?

How Do You Create a Link Direct to WooCommerce Checkout for 1 Specific Product?

Last updated on December 23, 2022 @ 8:36 pm

Assuming you have a WooCommerce store with products already set up and are using the default WooCommerce theme, you can follow these instructions to create a link that will take customers directly to the checkout page for a specific product:

1. Log in to your WordPress admin panel and go to WooCommerce > Settings > Products > Display

2. Find the “Default Product Sorting” setting and select “Name, A to Z” from the drop-down menu. This will ensure that your products are listed in alphabetical order on the front-end of your store, making it easier to find the one you want to create a direct link for.

3. Go to the product page for the product you want to create a direct link for, and copy the URL from the address bar of your browser. You will need this URL in the next step.

4. Go back to WooCommerce > Settings > Products > Display, and scroll down to the “Shop Page” section. In the “Shop Page” drop-down menu, select the page you want to use as your shop page (this is usually the “Shop” page).

5. Click on the “Save changes” button, and then go to that page on the front-end of your website. You should now see a list of all your products, in alphabetical order.

6. Find the product you want to create a direct link for, and click on its name. You will be taken to that product’s detail page.

7. Copy the URL from the address bar of your browser again, and add ?checkout=1 to the end of it.

For example, if the original URL was https://yourdomain.com/product/my-product/, then the new URL would be https://yourdomain.com/product/my-product/?checkout=1.

8. You can now use this new URL as a direct link to take customers straight to checkout for that specific product.

If you want to test it out, you can add ?add-to-cart=123 (replacing 123 with the ID of your product) to any page on your website, and then click on the resulting link.

You should be taken straight to checkout with that product added to your cart.

Creating a direct link like this can be useful if you want to promote a specific product on social media or in an email campaign, for example.

There are also plugins available that allow you do this without having to edit any code.

With WooCommerce Checkout Add-ons installed and activated, for example, you can add ?add-to-cart=123&addons=1&checkout=1 as your direct link.

And with WooCommerce One Page Checkout installed and activated, you can add ?checkout=1&opc_product_id=123 as your direct link (replacing 123 with your product’s ID).

Kathy McFarland

Kathy McFarland

Devops woman in trade, tech explorer and problem navigator.