How to create direct checkout link in Woocommerce
How can I create a direct checkout link from a WooCommerce product? So that when I click on a button, for example, then I’m redirected to the cart or checkout page with the product added?
First, you need to get the ID of your product. If you edit your product, you should see something like this in your address bar:
49 is the ID of the product. Yours will obviously be different.
If you want to put the product to the cart and want to redirect the user to the cart page, use this url
If you want to add the product to the cart, and redirect the customer straight to the checkout page, use this url