After a product is added to the cart, a message is displayed giving you option to Continue Shopping or to go to Checkout. I’d like it to automatically go to checkout when specific product is ordered. Can you provide me with code that I could add to the functions.php that would do this?
Try go to Dashboard > Woocommerce > Settings > Products > Display > ‘Add to cart behaviour’ and enable ‘Redirect to the cart page after successful addition’ checkbox.
After that navigate to Theme options > ‘Single product page’ and disable Ajax ‘Add to cart’.