Direct checkout only works for products which are connected to a course.
Confirm that your product is connected to a course in Product course settings metabox.
A product which is connected to a course would appear like this :
To fix this :
1. Edit the Product in WP Admin panel.
2. Locate the Course product settings.
3. Select the course. (note if you’re enabling subscription make sure you add subscription duration)
4. Update the product
5. View the product again.