I’m using Woo commerce plugin on my site but in the end of the process when user ordering a product(after “add to cart” , “checkout” and “billing” the last one don’t really exists) he gets to page where he have an access to download a file(that’s why the billing stage don’t really exist) that is the product.
The site based on memberships and I know it’s not the proper way for offering downloading products by membership, but it’s the way it is..
I need to prevent from user making all this long path through ‘add to cart’ , ‘checkout’ and ‘billing’ ( he need to pass 3-4 pages before he actually gets to the link) and get to the file downloading after he click ‘add to cart’ ,, by so i need some how create an order (with the product he selected) and bill it (all this on the background) and after he clicks ‘add to cart’ he already be redirected to downloading page(after the order been finalized )..
I’ve saw this link about redirecting to checkout page but it’s not enough ..
So how can I create some thing like this..
I know it’s kinda general question but I want to hear suggestions and if you can redirect me to some code it will be amazing…
Solve it .. posting it here if somebody will deal with the same issue..
implement it in functions.php
function redirect_to_checkout(){