In the ‘Publish’ section of your product set up, you have the option to limit the number of enrollments into your course or membership.
You’ll find this option directly under ‘Product Status’ and it will look like this:
To limit the number of people who sign up to your course/ membership, all you need to do is input your chosen number. In the example below, I’ve chosen 20 as the maximum amount of people who can enroll in my course:
When you reach this amount, it will replace the ‘Buy’ button on your product page with a greyed out ‘Enrollment Closed’ message box.
If you do not want to limit the number of people who enroll, you need to click the button that says ‘Disable’. Which will change the section to look like this: