If you run a blog and a store all on the same WordPress instance, chances are you are going to talk about products you sell in your blog posts. So how can you make it really easy for your visitors to add products you blog about directly to their cart? You can create a URL that you can use in your posts.
How can I create custom direct ‘Add to Cart’ links for products on my store?
To do this you need the product ID of the item you need a Add to Cart link created for. You can find the ID for your products from the Products page of your WooCommerce web store. You can see the product ID listed here when you hover your mouse on the products row.
You’ll then need to create a url like the following: https://www.yourwebsite.com/?add-to-cart=123; where 123 is your product ID, keep in mind you’ll also need to use your domain name.
The most important part of this funtionality is that you’re adding the following query parameter to the URL:
Once you’ve got the link created you can use this on any of your websites pages! In fact these links can work from anywhere, even places not on your website. So, for example, you could create the link directly to your cart and share these to your partners and affiliates for placing quick item orders!