Video Purchases: Add to Cart via URL
Simple products are easy to add to your cart via a custom URL. Find the Product ID by hovering over the product title in WooCommerce > Products, the Product ID is displayed directly under the product name (see image for an example).
Add One Simple Product to Cart
Now, make sure to set the correct domain name in the link, and the button will work! 1 product with ID=25 will be added your cart when clicked.
Please note that if you add product with different varieties (for example in colour or size), use the Variety ID as found inside the product.
Add One Product to Cart with Quantity = 5
1 product with ID=510 and quantity=5 is added to cart. Note: you can not add 2 different products to cart with 1 URL.
For a more detailed description and more on product varieties, please read this article:
WooCommerce Custom “Add to Cart” URLs – The Ultimate Guide