Add user to group after purchase

It depends on what platform you are selling your course and the purchase workflow.