I am building a language lesson site. The lessons themselves are served up on pages. I would like to restrict access on pages to those who have enrolled in a class.
So I need to be able to programmatically enable access when they have successfully paid for a class. I looked at the tutorials and found information about manually in/excluding access, but was unable to find anything on programmatic access.
Can you describe how one might programmatically enable access to page that is restricted?