This tutorial is for WooCommerce users.
WooCommerce does not limit the amount of products you can purchase by default. But for stock management purposes, you may allow one piece per order. This will avoid adding multiple quantity of products in a single order. People may click on the buy course button more than once by mistake. Or if you have a landing page where you’re selling the WooCommerce product directly, then the issue can happen as well.
So, the first thing you need to do is to check the option Sold Individually from the inventory settings of the product.
If you do not want to allow one student to buy a course multiple times, then you can use a plugin to limit one product per customer.
This is the plugin we have tested and working at this moment-